Binary, octal and hexadecimal 89
Problem 5. Convert 0.40625 10 to a binary
number.
From above, repeatedly multiplying by 2 gives:
.0
0. 8125
1 1 0 1
1. 0
0.40625 3 2 5
0.8125 3 2 5
0.25
3 2 5
0.5
3 2 5
0.625
3 2 5
0. 5
1. 25
1. 625
i.e. 0.40625 10 = 0.01101 2
Problem 6. Convert 58.3125 10 to a binary
number.
The integer part is repeatedly divided by 2, giving:
Remainder
0
1 1 1 0 1 0
2 58
2 29
2 14
2 7
2 3
2 1
0
1
0
1
1
1
The fractional part is repeatedly multiplied by 2 giving:
.0
0.625
1 0 1
0.3125 3 2 5
0.625 3 2 5
0.5
3 2 5
0.25 3 2 5
1.0
0.5
1.25
Thus 58.3125 10 = 111010.0101 2
Now try the following exercise
Exercise 39 Further problems on
conversion of decimal to binary numbers
In Problems 1 to 5, convert the decimal numbers
given to binary numbers.
1. (a) 5 (b) 15 (c) 19 (d) 29
(a) 101 2
(b) 1111 2
(c) 10011 2 (d) 11101 2
2. (a) 31 (b) 42 (c) 57 (d) 63
(a) 11111 2 (b) 101010 2
(c) 111001 2 (d) 111111 2
3. (a) 47 (b) 60 (c) 73 (d) 84
(a) 101111 2 (b) 111100 2
(c) 1001001 2 (d) 1010100 2
4. (a) 0.25 (b) 0.21875 (c) 0.28125
(d) 0.59375 (a) 0.01 2
(b) 0.00111 2
(c) 0.01001 2 (d) 0.10011 2
5. (a) 47.40625 (b) 30.8125 (c) 53.90625
(d) 61.65625
⎡
⎢
⎢
⎢
⎢
⎣
(a) 101111.01101 2
(b) 11110.1101 2
(c) 110101.11101 2
(d) 111101.10101 2
⎤
⎥
⎥
⎥
⎥
⎦
(c) Binary addition
Binary addition of two/three bits is achieved according
to the following rules:
sum
carry
sum
carry
0 + 0 = 0
0
0+ 0 + 0 = 0
0
0 + 1 = 1
0
0+ 0 + 1 = 1
0
1 + 0 = 1
0
0+ 1 + 0 = 1
0
1 + 1 = 0
1
0+ 1 + 1 = 0
1
1 + 0 + 0 = 1
0
1 + 0 + 1 = 0
1
1 + 1 + 0 = 0
1
1 + 1 + 1 = 1
1
These rules are demonstrated in the following worked
problems.
Problem 7. Perform the binary addition:
1001 + 10110
1001
+10110
11111
Précédent

- 108/705

Suivant