88 Higher Engineering Mathematics
=
1
2
+
1
8
+
1
16
= 0.5 + 0.125 + 0.0625
= 0.6875 10
Problem 3. Convert 101.0101 2 to a decimal
number.
101.0101 2 = 1 × 2
2
+ 0 × 2
1
+ 1 × 2
0
+ 0 × 2
−1
+ 1 × 2
−2
+ 0 × 2
−3
+ 1 × 2
−4
= 4 + 0 + 1 + 0 + 0.25 + 0 + 0.0625
= 5.3125 10
Now try the following exercise
Exercise 38 Further problems on
conversion of binary to decimal numbers
In Problems 1 to 5, convert the binary numbers
given to decimal numbers.
1. (a) 110 (b) 1011 (c) 1110 (d) 1001
[(a) 6 10 (b) 11 10 (c) 14 10 (d) 9 10 ]
2. (a) 10101 (b) 11001 (c) 101101 (d) 110011
[(a) 21 10 (b) 25 10 (c) 45 10 (d) 51 10 ]
3. (a) 101010 (b) 111000 (c) 1000001
(d) 10111000
[(a) 42 10 (b) 56 10 (c) 65 10 (d) 184 10 ]
4. (a) 0.1101
(b) 0.11001
(c) 0.00111
(d) 0.01011
(a) 0.8125 10
(b) 0.78125 10
(c) 0.21875 10 (d) 0.34375 10
5. (a) 11010.11 (b) 10111.011 (c) 110101.0111
(d) 11010101.10111
(a) 26.75 10
(b) 23.375 10
(c) 53.4375 10 (d) 213.71875 10
(b) Conversion of decimal to binary
An integer decimal number can be converted to a corresponding binary number by repeatedly dividing by 2
and noting the remainder at each stage, as shown below
for 39 10 .
Remainder
0
(most significant bit)
(least significant bit)
1 0 0 1 1 1
2 39
2 19
2 9
2 4
2 2
2 1
1
1
1
0
0
1
The result is obtained by writing the top digit of the
remainder as the least significant bit, (a bit is a binary
digit and the least significant bit is the one on the right).
The bottom bit of the remainder is the most significant
bit, i.e. the bit on the left.
Thus 39 10 = 100111 2
The fractional part of a decimal number can be converted
to a binary number by repeatedly multiplying by 2, as
shown below for the fraction 0.625
(most significant bit)
0
.1
1 (least significant bit)
1. 250
0. 500
1. 000
0.625 3 2 5
0.250 3 2 5
0.500 3 2 5
For fractions, the most significant bit of the result is the
top bit obtained from the integer part of multiplication
by 2. The least significant bit of the result is the bottom
bit obtained from the integer part of multiplication by 2.
Thus 0.625 10 = 0.101 2
Problem 4. Convert 47 10 to a binary number.
From above, repeatedly dividing by 2 and noting the
remainder gives:
Remainder
0
1 0 1 1 1 1
2 47
2 23
2 11
2 5
2 2
2 1
1
1
1
1
0
1
Thus 47 10 = 101111 2
Précédent

- 107/705

Suivant