Page 59 - Computer Science Class 11 With Functions
P. 59
Conversion of Hexadecimal Numbers to Binary
To convert a hexadecimal number to binary, write the 4-bit binary equivalent of each hexadecimal digit.
Example 43: (.D8) to binary
16
0. D 8
↓ ↓
1101 1000
= (0.11011000) 2
Example 44: Convert (16.8) to binary
16
1 6 . 8
↓ ↓ ↓
0001 0110 1000
= (10110.10) 2
Example 45: Convert (C7B.D6E) to binary
16
C 7 B . D 6 E
↓ ↓ ↓ ↓ ↓ ↓
1100 0111 1011 1101 0110 1110
=(110001111011.110101101110)
2
Find binary representation of (9.7) , (5A.AF) , and (C4.98) .
16 16 16
Conversion of Hexadecimal Numbers to Octal
To convert a hexadecimal number to an octal number, first convert it to a binary number and then convert the binary
number to a hexadecimal number.
Example 46: Convert (1F.3) to its equivalent octal number.
16
1 F . 3
↓ ↓ ↓
0001 1111 0011
Binary equivalent of (1F.3) is (00011111.0011) 2
16
two 0s added
0 1 1 1 1 1 . 0 0 1 1 0 0
3 7 . 1 4
Octal equivalent of (00011111.0011) is (37.14) 8
2
Example 47: Convert (A1F.B3) to its equivalent octal number.
16
A 1 F . B 3
↓ ↓ ↓ ↓ ↓
1010 0001 1111 1011 0011
Binary equivalent of (A1F.B3) is (101000011111.10110011)
16 2
one 0 added
1 0 1 0 0 0 0 1 1 1 1 1 . 1 0 1 1 0 0 1 1 0
5 0 3 7 . 5 4 6
Octal equivalent of (101000011111.101100110) is (5037.546)
2 8
Number Systems and Encoding Schemes 57

