Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

Number Conversion

Sun Nov 22, 2009 4:00 pm

Write a program to convert a number from decimal notation to a number expressed in a number system whose base (or radix) is a number between 2 and 9.
The conversion is performed by repetitious division by the base to which a number is being converted and then taking the remainders of division in the reverse order. For example, in converting to binary, number 6 requires three such divisions: 6/2=3 remainder 0, 3/2=1 remainder 1, and finally, 1 /2=0 remainder 1. The remainders 0,1 and 1 are put in reverse order so that the binary equivalent of 6 is equal to 110


Thanks!!!



Re: Number Conversion

Fri Nov 27, 2009 2:39 pm

you have to try coding by your self and any problem share with us .
As i see from the explanation provided , that it will be a loop , and devision and appending on a String .
Just try this :
java/binary-conversion-t10193.html

Post a reply
  Related Posts  to : Number Conversion
 convert integer number to octal,hexadecimal number systems     -  
 .dll conversion     -  
 Type Conversion     -  
 convert octal number to decimal number     -  
 convert decimal number to octal number     -  
 please get me the following Delphi to Java conversion     -  
 conversion from binary to decimal numbers as string     -  
 ramp Counter ANALOGUE TO DIGITAL CONVERSION (ADC)     -  
 SUCCESSIVE APPROXIMATION ANALOGUE TO DIGITAL CONVERSION     -  
 Number with dot in php     -