22:29 -
Computer Fundamentals
Convert A) Decimal to Binary (i) 5¾ (ii) 20
(i) 5¾ =101.11
5 / 2 = 2 + remainder of
1
2
/ 2 = 1 + remainder of 0
1
/ 2 = 0 + remainder of 1
Binary
presentation of 5 (read from down to up) = 101
¾
= 0.75 (Decimal representation)
0.75
-1 x 2-1 = 0.75 – 0.5=0.25
0.25
– 1x 2-2 = 0.25 – 0.25 = 0
Binary
presentation of ¾ = 0.11
Binary
presentation of 5¾ (or 5.75)=101.11
(ii) 20 =10100
20 / 2 =10 + remainder
of 0
10 / 2 = 5 + remainder of 0
5
/ 2 = 2 + remainder of 1
2
/ 2 = 1 + remainder of 0
1
/ 2 = 0 + remainder of 1
Binary
presentation of 20 (read from down to up) = 10100