Hexadecimal uses the digits 0-9 and the letters A-F, giving sixteen possible values per digit. The values are assigned like so:
Denary | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
Hex | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
You must be familiar with this table to be able to understand hexadecimal questions and the number system as a whole.
- Split the binary value into nibbles (four-bit values).
- Write the numbers over every bit, treating every nibble as a separate binary value (this means you write 1, 2, 4, and 8 over the digits in every nibble, starting at the right).
- Convert every nibble to denary. Each nibble will give you a value between 0 and 15.
- Convert each denary value to its hexadecimal equivalent. Use the table above if you don’t remember the equivalent values
- You now have the hexadecimal equivalent of the binary.
This process is shown in the diagram below:
Other conversions are also possible using similar techniques.
Converting from hexadecimal to binary
- Write the denary value for each hexadecimal digit.
- Convert each denary value into a nibble.
- You now have the binary equivalent of the hexadecimal value. Make sure you don’t write any spaces between the nibbles for your final answer.
Converting from denary to hexadecimal
- Convert the denary value to its binary equivalent.
- Follow the steps for converting binary to hexadecimal.
Converting from hexadecimal to denary
- Convert the hexadecimal value to its binary equivalent.
- Follow the steps for converting binary to denary, which can be found in this post.