3
Hexadecimal reference and base conversions
Hexadecimal is a base-16 number system that uses the digits 0 to 9 and the letters A, B, C, D, E and F.
Exam mode active: The Decimal–Hexadecimal reference table (0–31) and A–F key are hidden.
Hexadecimal letter values and conversion table (0–31)
Task A1: Converting hexadecimal numbers to decimal
Worked example (2D₁₆): Place values are 256 | 16 | 1. Two 16s = 32, and D = 13 ones. Total: 32 + 13 = 45₁₀.
Task A2: Converting decimal numbers to hexadecimal
Worked example (16₁₀): How many 16s go into 16? 16 ÷ 16 = 1 with remainder 0. Result: 10₁₆.
Task A3: Converting decimal to binary to hexadecimal
Alternative method: If you find binary easier, convert the decimal number into 8-bit binary first. Split the binary number into two groups of four bits, then convert each group into one hexadecimal digit. A group of four bits is called a nibble.
All numbers in this task fit in eight bits (decimal 0 to 255). Keep any zeros at the start so that you have two complete nibbles.
Remember: Use place values 8 4 2 1 separately for each nibble. For values above 9, use 10 = A, 11 = B, 12 = C, 13 = D, 14 = E, 15 = F.
Worked example: Convert 173₁₀ to hexadecimal via binary
1. Choose the binary place values. Work from left to right through 128, 64, 32, 16, 8, 4, 2, 1. If a value fits into the amount left, use it and subtract it. Otherwise, skip it.
For 173: 173 − 128 = 45; skip 64; 45 − 32 = 13; skip 16; 13 − 8 = 5; 5 − 4 = 1; skip 2; 1 − 1 = 0. So 173 = 128 + 32 + 8 + 4 + 1.
2. Write the binary number. Write 1 under each value used and 0 under each unused value.
Reading the bits from left to right gives 10101101₂.
3. Split into two nibbles. Keep the bits in the same order: 1010 | 1101.
4. Convert each nibble. Restart the place values at 8 4 2 1 for each group: 1010 = 8 + 2 = 10 = A; 1101 = 8 + 4 + 1 = 13 = D.
5. Join the hexadecimal digits. Write the left nibble's digit first, followed by the right nibble's digit. Result: 173₁₀ = 10101101₂ = AD₁₆.
Try each problem using this method. In your working, show the 8-bit binary number and its two 4-bit nibbles before entering the hexadecimal answer.
Task B1: Converting binary numbers to hexadecimal
Worked example (10110110₂): Split into two 4-bit nibbles with weights 8 4 2 1: 1011 (8+2+1 = 11 = B) and 0110 (4+2 = 6). Result: B6₁₆.
Task B2: Converting hexadecimal numbers to binary
Worked example (20₁₆): Convert each digit into a 4-bit nibble (8 4 2 1): 2 = 0010 and 0 = 0000. Result: 00100000₂.