Memory & Storage
To convert a two-digit hexadecimal number to denary by place value, use the fact that hexadecimal is base 16. The place values are 16 and 1: the left-hand digit is multiplied by 16 and the right-hand digit by 1, then the two results are added together.
Before you multiply or add, change any letter digit into its denary value. Digits 0 to 9 keep their value; A to F stand for 10 to 15.
| Hexadecimal digit | Denary value |
|---|---|
| A | 10 |
| B | 11 |
| C | 12 |
| D | 13 |
| E | 14 |
| F | 15 |
The multiplication step matters because the digits sit in different columns and do not have equal worth. For example, in D4, change D to 13, work out 13 × 16 = 208, then add the 4 from the right-hand position: 208 + 4 = 212. So D4 in hexadecimal is 212 in denary.
Here is another example. Change B in 6B to 11. Take the 6, multiply it by 16, then add the 11: 6 × 16 = 96, and 96 + 11 = 107. Write each stage clearly so your working shows the letter changed, the multiplication by 16 and the final addition.
A to F are not alphabet positions: A means 10, not 1, and F means 15, not 6. Because two hexadecimal digits give 256 possible patterns, a two-digit hexadecimal number converts to a denary value from 0 to 255.
You can turn a two-digit hexadecimal number into denary by going through binary. Split the hexadecimal number into its two digits, change each digit into a 4-bit nibble, join the nibbles into 8 bits, then add up the column headings wherever a 1 appears.
Each hexadecimal digit stands for one nibble, so it has a fixed 4-bit pattern built from the nibble column headings 8, 4, 2 and 1. Digits 0 to 9 use their usual value; letters A to F mean 10 to 15. For example, 2 is 0010, while A means 10, which is 8 + 2, giving 1010.
The nibbles are placed side by side in the order they appear. The left digit supplies the left four bits and the right digit supplies the right four bits, so the nibbles are not added together. Take 2A: 2 is 0010 and A (10, which is 8 + 2) is 1010, so together they make 00101010.
Now read the 8 bits against the column headings 128, 64, 32, 16, 8, 4, 2 and 1, and add only the columns holding a 1. For 00101010 the 1s sit in the 32, 8 and 2 columns, so the denary value is 32 + 8 + 2 = 42.
The point of the route through binary is that it shows how the hexadecimal digits build up one byte: each nibble is a small binary number, and joining them lines up all eight columns.
| Hexadecimal digit | Denary value | 4-bit nibble |
|---|---|---|
| 4 | 4 | 0100 |
| 9 | 9 | 1001 |
| A | 10 | 1010 |
| D | 13 | 1101 |
| F | 15 | 1111 |
The place-value method on the same number gives 42 too, so the two routes agree.
There are two ways to turn a two-digit hexadecimal number into denary. The place-value method works on the digits themselves: the left digit counts 16s and the right digit counts 1s. The binary method changes each digit into a 4-bit nibble, joins them into 8 bits, then adds the binary place values. They look different but do exactly the same job, so both must reach the same denary answer — which makes one a ready-made check on the other.
Take 4D, remembering that D is denary 13.
| Method | Working for 4D | Denary |
|---|---|---|
| Place value | D = 13, so 4 × 16 = 64, then 64 + 13 | 77 |
| Binary | 4 = 0100 and D = 1101, giving 01001101, so 64 + 8 + 4 + 1 | 77 |
Both routes give 77 because they are the same sum written differently. The place-value method counts 16s with the left digit and 1s with the right digit. In the binary method each nibble uses place values 8, 4, 2 and 1, and every bit of the left nibble is worth 16 times the matching bit of the right nibble, so the left nibble ends up counting 16s in just the same way.
Two hexadecimal digits make up one byte, so the denary result must be a positive whole number from 0 to 255. An answer of 300, or a negative answer, proves something has gone wrong: digits swapped, a letter read with the wrong value, or the right digit multiplied by 16 instead of added. Adding the two digits together is another slip, because 4 + 13 = 17 ignores the 16s completely. Once your answer is inside that range, convert the hexadecimal number again with the other method and check that both results match.
Finally, check which direction the question wants. 4D converts to 77, but starting from 77 and producing 4D is a different procedure. Read carefully and label your final value as denary.