Hexadecimal to Decimal conversion
How to convert hexadecimal to decimal:
For hexadecimal number with n digits:
dn-1 … d3 d2 d1 d0
The decimal number is equal to the sum of hexadecimal digits (dn) times their power of 16 (16n):
decimal = d0×160 + d1×161 + d2×162 + …
Example:1
Find the decimal value of 19 hexadecimal:
Convert (19)16 to (n)10
Hexadecimal Value | 1 | 9 |
Power of 16 | 161 | 160 |
=> 1*161 + 9*160
=> 16 + 9
=> 25
So we have
(19)16 = (25)10
Example:2
Find the decimal value of 1F hexadecimal:
Convert (1F)16 to (n)10
Hexadecimal Value | 1 | F(15 |
Power of 16 | 161 | 160 |
=> 1*161 + 15*160
=> 16 + 15
=> 31
So we have
(1F)16 = (31)10
Example:3
Find the decimal value of 9F hexadecimal:
Convert (9F)16 to (n)10
Hexadecimal Value | 9 | F(15) |
Power of 16 | 161 | 160 |
=> 9*161 + 15*160
=> 144 + 15
=> 159
So we have
(9F)16 = (159)10