This week's book giveaway is in the Design forum.We're giving away four copies of Building Microservices and have Sam Newman on-line!See this thread for details.
Big Moose Saloon
 Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies Register / Login Win a copy of Building Microservices this week in the Design forum!

# Hex, Octal conversion

John Anderson
Greenhorn

Joined: Apr 12, 2002
Posts: 3
Hello everyone, I am taking the text Tuesday...
I can not find any info on how to convert a decimal to an Octal or Hex. I understand how to convert an Octal or Hex to decimal.
Could someone shed some light on this for me?
Thanks!
Neelima Rao
Greenhorn

Joined: Feb 24, 2002
Posts: 26
Here u go.......
http://www.rz.uni-hohenheim.de/rz/sys/basics/csc102/ch3.html
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
shrink182,
I'd like you to read the Javaranch Naming Policy and change your publicly displayed name to comply with our unique rule. Thank you.
[ April 12, 2002: Message edited by: Valentin Crettaz ]

SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Suman Dass
Greenhorn

Joined: Feb 20, 2002
Posts: 28
pl search the web or look into any standard math book. best of luck for the exams!!!
vinita Kh
Ranch Hand

Joined: Feb 19, 2002
Posts: 49
a short cut way to convert decimal to Hex or Oct
lets convert decimal 300 to Hex ---
300/16 result->18 Rest ->12 write rest in Hex -> C
18/16 result->1 Rest ->2 Write rest in Hex -> 2
1/16 result ->0 Rest ->1 Write rest in Hex -> 1
resverse hex digits thus obtained ie ->12C
hence
300(decimal) = 12C (Hex)
similarly replace 16 with 8 to convert to octal
Cheers..
Vinita
John Anderson
Greenhorn

Joined: Apr 12, 2002
Posts: 3
Thanks for the help guys, that info should do the trick. Thanks

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com

subject: Hex, Octal conversion