Friday, September 2, 2011

Finding the Decimal Equivalent

       The decimal equivalent of a given number in another number system is given by the sum of all
the digits multiplied by their respective place values. The integer and fractional parts of the given
number should be treated separately. Binary-to-decimal, octal-to-decimal and hexadecimal-to-decimal
conversions are illustrated below with the help of examples.

Binary-to-Decimal Conversion :
The decimal equivalent of the binary number (1001.0101)2 is determined as follows:
• The integer part = 1001
• The decimal equivalent = 1 × 20 + 0 × 21 + 0 × 22 + 1 × 23 = 1 + 0 + 0 + 8 = 9
• The fractional part = .0101
• Therefore, the decimal equivalent = 0 × 2−1 + 1 × 2−2 + 0 × 2−3 + 1 × 2−4 = 0 + 0.25 + 0
+ 0.0625 = 0.3125
• Therefore, the decimal equivalent of (1001.0101)2
= 9.3125

Octal-to-Decimal Conversion :

The decimal equivalent of the octal number (137.21)8 is determined as follows:
• The integer part = 137
• The decimal equivalent = 7 × 80 + 3 × 81 + 1 × 82 = 7 + 24 + 64 = 95
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

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 × 160 + 14 × 161 + 1 × 162 = 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×20 +1×21+1×22 +1×23+0×24 +0×25+0×26
= 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×20 +1×21+0×22 +0×23+1×24 +1×25
+1×26
= 0+2+0+0+16+32+64 = 114
Therefore, 10001110 represents −114

No comments:

Post a Comment

Disclaimer: "I do not own the rights of the content provided in this blog. All content provided on this blog is for informational purposes only. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information".