Binary, octal and hexadecimal 89
Problem 5. Convert 0.40625 10 to a binary
number.
From above, repeatedly multiplying by 2 gives:
.0
- 8125
1 1 0 1
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
- 5
- 25
- 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 11010
258
229
214
27
23
21
0 1 0 1 1 1
The fractional part is repeatedly multipliedby 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.
- (a) 5 (b) 15 (c) 19 (d) 29
[
(a) 1012 (b) (^11112)
(c) 100112 (d) (^111012)
]
- (a) 31 (b) 42 (c) 57 (d) 63
[
(a) 111112 (b) (^1010102)
(c) 1110012 (d) (^1111112)
]
- (a) 47 (b) 60 (c) 73 (d) 84
[
(a) 1011112 (b) (^1111002)
(c) 10010012 (d) (^10101002)
]
- (a) 0.25 (b) 0.21875 (c) 0.28125
(d) 0.59375
[
(a) 0. 012 (b) 0. (^001112)
(c) 0. 010012 (d) 0. (^100112)
]
- (a) 47.40625 (b) 30.8125 (c) 53.90625
(d) 61.65625
⎡ ⎢ ⎢ ⎢ ⎢ ⎣
(a) 101111. (^011012)
(b) 11110. (^11012)
(c) 110101. (^111012)
(d) 111101. (^101012)
⎤ ⎥ ⎥ ⎥ ⎥ ⎦
(c) Binary addition
Binary addition of two/three bits is achievedaccording
to the following rules:
sum carry sum carry
0 + 0 = 000 + 0 + 0 = 00
0 + 1 = 100 + 0 + 1 = 10
1 + 0 = 100 + 1 + 0 = 10
1 + 1 = 010 + 1 + 1 = 01
1 + 0 + 0 = 10
1 + 0 + 1 = 01
1 + 1 + 0 = 01
1 + 1 + 1 = 11
These rules are demonstrated in the following worked
problems.
Problem 7. Perform the binary addition:
1001 + 10110
1001
- 10110
11111