Page 52 - Computer Science Class 11 With Functions
P. 52
Binary to Decimal Conversion
To convert a binary fraction to decimal, we use place values (base 2) and follow the following steps:
1. Write the binary number.
2. Below each digit, write the place value of each digit position.
3. Multiply the face value of each digit with its place value.
4. Add all values obtained in step 3 to get the decimal number.
Next, we convert the binary numbers in examples 18, 19, 20, 21 and 22 to their equivalent decimal numbers.
Example 18: (0.01) to decimal
2
Face Value 0 . 0 1
–1
Place value 2 0 2 2 –2
–1
0
= 0 × 2 + 0 × 2 + 1 × 2 –2
= 0 + 1
2 2
= 0 + 1 = 0.25
4
Therefore (0.01) = (0.25) 10
2
Example 19: (0.011) to decimal
2
Face value 0 . 0 1 1
Place value 2 0 2 2 2 –3
–2
–1
–1
–2
0
= 0 × 2 + 0 × 2 + 1 × 2 + 1 × 2 –3
= 0 + 1 + 1
2 2 2 3
= 1 + 1 = (0.375)
4 8 10
Example 20: (0.010) to decimal
2
Note that trailing zeros in the fractional part do not affect its value. Hence, we write: (0.010) 2
= (0.01) 2
Face value 0 . 0 1
Place value 2 0 2 –1 2
–2
–1
= 0 × 2 + 1 × 2 –2
= 0 + 1
4
= (0.25) 10
Example 21: (0.010011001) to decimal
2
Face Value 0. 0 1 0 0 1 1 0 0 1
Place Value 2 0 2 –1 2 –2 2 –3 2 –4 2 –5 2 –6 2 –7 2 –8 2 –9
–1
–2
–6
–8
= 0 × 2 + 1 × 2 + 0 × 2 + 0 × 2 + 1 × 2 + 1 × 2 + 0 × 2 + 0 × 2 + 1 × 2 –9
–5
–4
–3
–7
1 1 1 1
= + + +
2 2 2 5 2 6 2 9
1 1 1 1
= + + +
4 32 64 512
= 0.25 + 0.03125 + 0.01562 + 0.001953
= (0.29882) 10
50 Touchpad Computer Science-XI

