Total members 11890 |It is currently Fri Apr 19, 2024 4:41 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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!!!




Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time

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

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 2 posts ] 

  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     -  
 ramp Counter ANALOGUE TO DIGITAL CONVERSION (ADC)     -  
 SUCCESSIVE APPROXIMATION ANALOGUE TO DIGITAL CONVERSION     -  
 conversion from binary to decimal numbers as string     -  
 Number with dot in php     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com