Number Systems
7
• The fractional part = .21
• The decimal equivalent = 2 × 8
−1
+ 1 × 8
−2
= 0.265
• Therefore, the decimal equivalent of (137.21) 8 = (95.265) 10
1.9.3 Hexadecimal-to-Decimal Conversion
The decimal equivalent of the hexadecimal number (1E0.2A) 16 is determined as follows:
• The integer part = 1E0
• The decimal equivalent = 0 × 16
0
+ 14 × 16
1
+ 1 × 16
2
= 0 + 224 + 256 = 480
• The fractional part = 2A
• The decimal equivalent = 2 × 16
−1
+ 10 × 16
−2
= 0.164
• Therefore, the decimal equivalent of (1E0.2A) 16 = (480.164) 10
Example 1.2
Find the decimal equivalent of the following binary numbers expressed in the 2’s complement format:
(a) 00001110;
(b) 10001110.
Solution
(a) The MSB bit is ‘0’, which indicates a plus sign.
The magnitude bits are 0001110.
The decimal equivalent = 0 × 2
0
+ 1 × 2
1
+ 1 × 2
2
+ 1 × 2
3
+ 0 × 2
4
+ 0 × 2
5
+ 0 × 2
6
= 0 + 2 + 4 + 8 + 0 + 0 + 0 = 14
Therefore, 00001110 represents +14
(b) The MSB bit is ‘1’, which indicates a minus sign
The magnitude bits are therefore given by the 2’s complement of 0001110, i.e. 1110010
The decimal equivalent = 0 × 2
0
+ 1 × 2
1
+ 0 × 2
2
+ 0 × 2
3
+ 1 × 2
4
+ 1 × 2
5
+1 × 2
6
= 0 + 2 + 0 + 0 + 16 + 32 + 64 = 114
Therefore, 10001110 represents −114
1.10 Decimal-to-Binary Conversion
As outlined earlier, the integer and fractional parts are worked on separately. For the integer part,
the binary equivalent can be found by successively dividing the integer part of the number by 2
and recording the remainders until the quotient becomes ‘0’. The remainders written in reverse order
constitute the binary equivalent. For the fractional part, it is found by successively multiplying the
fractional part of the decimal number by 2 and recording the carry until the result of multiplication
is ‘0’. The carry sequence written in forward order constitutes the binary equivalent of the fractional
7
• The fractional part = .21
• The decimal equivalent = 2 × 8
−1
+ 1 × 8
−2
= 0.265
• Therefore, the decimal equivalent of (137.21) 8 = (95.265) 10
1.9.3 Hexadecimal-to-Decimal Conversion
The decimal equivalent of the hexadecimal number (1E0.2A) 16 is determined as follows:
• The integer part = 1E0
• The decimal equivalent = 0 × 16
0
+ 14 × 16
1
+ 1 × 16
2
= 0 + 224 + 256 = 480
• The fractional part = 2A
• The decimal equivalent = 2 × 16
−1
+ 10 × 16
−2
= 0.164
• Therefore, the decimal equivalent of (1E0.2A) 16 = (480.164) 10
Example 1.2
Find the decimal equivalent of the following binary numbers expressed in the 2’s complement format:
(a) 00001110;
(b) 10001110.
Solution
(a) The MSB bit is ‘0’, which indicates a plus sign.
The magnitude bits are 0001110.
The decimal equivalent = 0 × 2
0
+ 1 × 2
1
+ 1 × 2
2
+ 1 × 2
3
+ 0 × 2
4
+ 0 × 2
5
+ 0 × 2
6
= 0 + 2 + 4 + 8 + 0 + 0 + 0 = 14
Therefore, 00001110 represents +14
(b) The MSB bit is ‘1’, which indicates a minus sign
The magnitude bits are therefore given by the 2’s complement of 0001110, i.e. 1110010
The decimal equivalent = 0 × 2
0
+ 1 × 2
1
+ 0 × 2
2
+ 0 × 2
3
+ 1 × 2
4
+ 1 × 2
5
+1 × 2
6
= 0 + 2 + 0 + 0 + 16 + 32 + 64 = 114
Therefore, 10001110 represents −114
1.10 Decimal-to-Binary Conversion
As outlined earlier, the integer and fractional parts are worked on separately. For the integer part,
the binary equivalent can be found by successively dividing the integer part of the number by 2
and recording the remainders until the quotient becomes ‘0’. The remainders written in reverse order
constitute the binary equivalent. For the fractional part, it is found by successively multiplying the
fractional part of the decimal number by 2 and recording the carry until the result of multiplication
is ‘0’. The carry sequence written in forward order constitutes the binary equivalent of the fractional
