personally, i'd tend to use a scientific calculator -- but if you don't have one available, the other easy thing to do would be to write a small utility in java to do it for you -- in fact, there's at least one utility class that already does most of the work for you, with the signature: public static String toOctalString(int i) // for strings you can also use the calculator at this page: http://www.science-ebooks.com/electronics/new_page_12.htm hope that helps, :-) --- n sky ---
Fei Ng
Ranch Hand
Joined: Aug 26, 2000
Posts: 1241
posted
0
oh no.. by hand. Anyone know a easy method to do it on paper?
vivek j alva
Greenhorn
Joined: Oct 12, 2001
Posts: 3
posted
0
for example say 35 is decimal number. than octal form of it would be 43. you have to divide 35 by 8 your remainder=3 qotient=4 again divide qotient by 8 your remainder=4 qotient=0 now read remainder from down to up. you will get 43.
Mr Iftikhar
Ranch Hand
Joined: Oct 12, 2001
Posts: 39
posted
0
System.out.println(Integer.toOctalString(9)); This will print the octal equivalent of decimal 9. or you can save you value. String s = Integer.toOctalString(9);
java language
Jane Griscti
Ranch Hand
Joined: Aug 30, 2000
Posts: 3141
posted
0
Hi Fei, I've got some notes at http://www.janeg.ca/scjp/oper/binhex.html that might help. ------------------ Jane Griscti Sun Certified Programmer for the Java� 2 Platform