This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Conversion problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Conversion problem" Watch "Conversion problem" New topic
Author

Conversion problem

Sheetal Kaul
Ranch Hand

Joined: Nov 29, 2004
Posts: 47
Hi,

I've developed a program which takes the value(Decimal Number) from the User, & convert it to Binary, hexa decimal, & Octal...bt i'm not getting correct converted values.

So plz can anyone send me the program or atleast Algorithm for these conversion problem.


Thanxs
Sheetal
pascal betz
Ranch Hand

Joined: Jun 19, 2001
Posts: 547
so what does your code look like ? whats the error ?

pascal
Sheetal Kaul
Ranch Hand

Joined: Nov 29, 2004
Posts: 47
Hi,

I think my algorithm is wrong... so if you have any then plz send me that, or please tell me how to do this. Decimal to binary conversion.


Thanxs
Sheetal
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Describe your algorithm. People will help if you demonstrate you are trying, but are less willing to help otherwise.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Conversion problem
 
Similar Threads
Packed decimal conversion - Java
Hex Fix
narrowing double to byte question.
storing money as a double
decimal format conversion