Hexadecimal to Decimal Conversion



Hexadecimal to Decimal Conversion

To convert a hexadecimal number to its equivalent decimal number, we multiply each digit in the hexadecimal number by its positional weight and then add all the product terms to obtain the final result.

The step-by-step procedure to convert a hexadecimal number to its equivalent decimal number is explained below −

Step 1 − Write the positional weights for each hexadecimal digit.

Step 2 − Multiply each hexadecimal digit with its positional weight.

Step 3 − Add the product terms to obtain the equivalent decimal number.

Let us see some examples to understand the conversion of hexadecimal to decimal number.

Example 1

Convert (5AB2.8C)16 to decimal equivalent.

Solution

The conversion of the given hexadecimal number to its decimal equivalent is given below −

Hex Digits Decimal Equiv. Positional Weights Multiply Product
5 5 (16)3 5 × (16)3 20480
A 10 (16)2 10 × (16)2 2560
B 11 (16)1 11 × (16)1 176
2 2 (16)0 2 × (16)0 2
. . . . .
8 8 (16)-1 8 × (16)-1 0.5
C 12 (16)-2 12 × (16)-2 0.0468

Add all the product terms to obtain the equivalent decimal,

(5AB2.8C)16 = 20480 + 2560 + 176 + 2 + 0.5 + 0.0468 = (23218.5468)10

Example 2

Convert (1AF.2)16 to decimal.

Solution

The decimal equivalent of the given hexadecimal number can be obtained as follows −

Hex Digits Decimal Equiv. Positional Weights Multiply Product
1 1 (16)2 1 × (16)2 256
A 10 (16)1 10 × (16)1 160
F 15 (16)0 15 × (16)0 15
. . . . .
2 2 (16)-1 2 × (16)-1 0.125

Adding the product terms to obtain the equivalent decimal number,

(1AF.2)16 = 256 + 160 + 15 + 0.125 = (431.125)10

Advertisements