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

In a 0.1000M solution of methanoic acid, [H+] = 4.2 x 10-3M. Calculate the Ka of this acid.
find the probability of rolling factors of 2 on first die​
What is the volume of a rectangular prism with the dimensions: base 5 8 cm, height 2 3 cm, and length 3 4 cm?
earths scientists think that ____ caused significant climate change in the past. a humans b polar ice caps c global warming d plate tectonics ​
What’s another name for aperture? A. Shutter speed B. F-stop C. ISO
how are the rocky mountains different from the Appalachians?
A wire with resistance r is connected to the terminals of a 30 v battery. part a what is the potential difference δvends between the ends of the wire?
el carroA) Necesito ver el médico, por favor. el paso de peatonesB) Puedo ver el hueso roto en los rayos X. el museo de arteC) Tengo que pasar por aquí porque t
How many different emperors did the Roman Empire have in a forty nine year period?
What procedure do scientists use to make new discoveries?​