how do I convert the following decimal numbers to binary a 1
how do I convert the following decimal numbers to binary: a) 17.71875 b) 50.7 C) 74.635 and d) 100.5?
Solution
divide the number before decimal by 2 until get 0 and save remainders
a) 17.71875
17
Remainders
2|17
2|8 1
2|4 0
2|2 0
2|1 0
|0 1
taking remainders in reverse order 17 = (10001)2
0.71875 --fraction part is multiplied by 2 until you get 0 after decimal point
0.71875
*2
1.4375 extract 1
.4375 *2 = 0.875 extract 0
0.875 *2 = 1.75 extract 1
0.75*2 = 1.5 extract 1
0.5 * 2 = 1.0 extract 1
fraction part is 0
take extractions in order .10111
(17.71875 )10 = (10001.10111)2
b) 50.7
remainders
2|50
2|25 0
2|12 1
2|6 0
2|3 0
2|1 1
|0 1
(50)10 = (110010)2
0.7 *2 =1.4 extract 1
0.4*2 =0.8 extract 0
0.8*2 =1.6 extract 1
0.6 *2 = 1.2 extract 1
(50.7)10 = (110010.1011)2
c) 74.635
Remainders
2|74
2|37 0
2|18 1
2|9 0
2|4 1
2|2 0
2|1 0
|0 1
(74)10 =( 1001010)2
0.635 *2 = 1.27 extract 1
0.27 *2 = 0.54 extract 0
0.54 *2 = 1.08 extract 1
(74.635)10 = (1001010.1010)2
d) 100.5
remainders
2|100
2|50 0
2|25 0
2|12 1
2|6 0
2|3 0
2|1 1
|0 1
0.5 * 2 = 1.0 extract 1 left with .0
(100.5)10 = (1100100.1)2


