It's not a secret anymore!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes decimal ->octal & decimal ->hexadecimal Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "decimal ->octal & decimal ->hexadecimal" Watch "decimal ->octal & decimal ->hexadecimal" New topic
Author

decimal ->octal & decimal ->hexadecimal

geetha nagarajan
Ranch Hand

Joined: Jul 13, 2001
Posts: 94
How to convert a decimal value ,to octal /hexadecimal?
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
Originally posted by geetha nagarajan:
How to convert a decimal value ,to octal /hexadecimal?

Convert that decimal value to binary. From there, it's very easy to convert to octal or hex.
If you need examples, do a search in this forum - there are gobs of them.
Corey


SCJP Tipline, etc.
geetha nagarajan
Ranch Hand

Joined: Jul 13, 2001
Posts: 94
Could someone explain that with an example,pl?
Thanks.
Francisco A Guimaraes
Ranch Hand

Joined: Mar 20, 2002
Posts: 182
look at this thread
if you still have doubts after this, please let me know.
Francisco


Francisco<br />SCJP<br />please use the [code][/code] tags when showing code.Click <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=ubb_code_page" target="_blank" rel="nofollow">here</a> to see an example.
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
Originally posted by geetha nagarajan:
Could someone explain that with an example,pl?
Thanks.

Use the search facility. Here are some threads I uncovered:
number converstion between(decimal, octal, Hex)
Binary, Octal, and Hex
Hexidecimal and octal question!!
Conversion of binary to Hex and Octal State
Using search would provide you with an immediate answer. Otherwise, you might have to wait a while (possibly hours) before someone replies to your message. Don't be afraid to search for what you want. This forum has been around a while - there's lots out there to search through.
Corey
geetha nagarajan
Ranch Hand

Joined: Jul 13, 2001
Posts: 94
Thanks a lot,got it.
Ya,will use the search facility more often from now on.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: decimal ->octal & decimal ->hexadecimal
 
Similar Threads
Conversion
Numerice value for letter 'a'
please help ???? how to convert hexadecimal ,octol to decimal values and back
Conversion
int length=343 is 343 an integer literal or decimal literal???