Converting hexadecimal (base-16) numbers to denary (base-10) is an essential skill, and a guaranteed exam question!
Denary numbers are 0 – 9.
Hexadecimal numbers are 0 – 15, with numbers after 9 represented by letters A – F.
The easiest method is to use binary as a middle step. Let's go through the process and convert this hexadecimal number to denary…
| 7 | A |
Step 1: Split the Bits
Split the two hexadecimal numbers into single digits.
| 7 | A |
| 7 | A |
Step 2: Convert Digits to Denary
Convert each digit to denary.
For numbers 0 – 9, it will be the same. For numbers A – F, use 10 – 15.
| 7 | = | 7 |
7 less than 10, so it is the same in hexadecimal and denary.
| A | = | 10 |
A in hex is equivalent to 10 in denary.
Step 3: Convert to Binary Nibbles
Convert each denary digit into a nibble (a four-bit binary number).
7 =
| 8 | 4 | 2 | 1 |
|---|---|---|---|
| 0 | 1 | 1 | 1 |
10 =
| 8 | 4 | 2 | 1 |
|---|---|---|---|
| 1 | 0 | 1 | 0 |
Step 4: Join into a Byte
Put our two binary nibbles together to create one byte.
Remember to re-number the binary columns for the first nibble.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | |
|---|---|---|---|---|---|---|---|---|
| 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 |
Step 5: Convert Binary to Denary
Finally, convert the whole binary byte into a decimal number.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 |
64 + 32 + 16 + 8 + 2 = 122
The answer
We have now converted 7A16 to 12210.