SimpleDis
SimpleDis SimpleDis
  • 12-03-2016
  • Computers and Technology
contestada

Algorithm for converting decimal into binary.

Respuesta :

Аноним Аноним
  • 12-03-2016
The simplest way is to make for loop first you need to generate 1,2,4,8,16,32,64,128,256....and others number in Array. Then you will check every number. Like this.
Decimal Input 84;
64 is closest to 84.
84-64=20
Write: 1
20-32=-12(Because It's negative you will write 0)
Write:10
20-16=4
Write: 101
4-8=-4 (Negative)
Write:1010
4-4=0
Write: 10101
0-2=-2
0-1=-1
Write: 1010100 = 84
Answer Link

Otras preguntas

Which of the following may display two different grain sizes? a. metamorphic rock c. igneous rock b. sedimentary rock d. magma
What is the current value of a future sum of money called?
do sound waves must have a medium to travel but elctromagnetic waves cannot
In 2004 astronomers reported the discovery of a large Jupiter-sized planet orbiting very close to the star HD 179949 (hence the term "hot Jupiter"). The orbit w
Why was the cloning of Dolly such a monumental step in the history of reproductive technology
An object accelerates at 5 m/s2, over a 3 second time period to a final velocity of 20 m/s. What is the initial velocity?
What is 20 time 4 equal?
Which lines in this excerpt from act III of Shakespeare’s Romeo and Juliet best show Lord Capulet’s oppressive and authoritarian nature? a. CAPULET: Things have
which will fill up first?!?
ALGEBRA 1 HELP PLEASE