Page 55 - Computer Science Class 11 With Functions
P. 55
Conversion of Fractions from Octal to Decimal
To convert an octal fraction to decimal, we use place values (base 8) and follow the following steps:
1. Write the octal 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.
Example 28: Convert (0.412) to decimal
8
Face Value 0 . 4 1 2
Place Value 0 8 –1 8 –2 8 –3
–2
= 4 × 8 + 1 × 8 + 2 × 8 –3
–1
= 4 + 1 + 1
8 64 512
= 0.5 + 0.015625 + 0.001953125
= (0.517578125)
10
Example 29: Convert (1606.643) to decimal
8
Face Value 1 6 0 6 . 6 4 3
Place Value 8 3 8 2 8 1 8 0 8 –1 8 –2 8 –3
–2
–1
= 1 × 8 + 6 × 8 + 0 × 8 + 6 × 8 + 6 × 8 + 4 × 8 + 3 × 8 –3
2
3
1
0
= 512 + 384 + 0 + 6 + 0.75 + 0.0625 + 0.00585
= (902.81835) 10
Find decimal representation of (0.2) , (0.4) and (0.7) .
8
8
8
Conversion of Decimal Fractions to Hexadecimal
To convert fractional numbers in a decimal number system to hexadecimal, the steps are as follows:
1. Multiply the fractional part by 16.
2. Note the integer part after multiplication by 16.
3. Multiply only the fractional part obtained in step 1 by 16.
4. In the case of terminating fractions, repeat steps 2 and 3 till the fractional part becomes zero. However, in the case
of non-terminating fractions, repeat steps 2 and 3 up to the recurring integer part. Examples 30 and 31 illustrate
the conversion of terminating and non-terminating fractions.
5. The integer part, from top to bottom forms the hexadecimal number.
Example 30: Convert (0.25) to its equivalent hexadecimal number.
10
Integer part
0.25 × 16 = 4.0 4
0.0 × 16 = 0 0
= (0.40) 16
Number Systems and Encoding Schemes 53

