Skip to main content
EnglandComputer ScienceSyllabus dot point

Why is hexadecimal useful, and how do we convert to and from it?

Understand hexadecimal, convert between binary, denary and hexadecimal, and explain why hexadecimal is used.

A focused answer to AQA GCSE Computer Science 3.3.3, covering hexadecimal, converting between binary, denary and hexadecimal, and why hexadecimal is used.

Generated by Claude Opus 4.88 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. What hexadecimal is
  3. Binary to hexadecimal
  4. Denary to hexadecimal
  5. Hexadecimal to denary
  6. Why hexadecimal is used
  7. Denary to hexadecimal the other way
  8. A worked colour code
  9. Try this

What this dot point is asking

AQA wants you to understand hexadecimal (base 16), convert between binary, denary and hexadecimal in any direction, and explain why hexadecimal is used in computing.

What hexadecimal is

The neat property that makes hex so useful is that 16=2416 = 2^4, so one hex digit corresponds to exactly four binary digits with no overlap. That is why a byte (8 bits) is always exactly two hex digits, and why you can convert between binary and hex by handling each nibble separately rather than working out the whole value. Programmers see hex constantly: colour codes like #FF8800, memory addresses, MAC addresses, and machine-code dumps are all written in hex.

Binary to hexadecimal

Split the binary into groups of four bits from the right, then convert each group to one hex digit.

Denary to hexadecimal

Divide the denary number by 16: the whole-number part of the division is the first hex digit, and the remainder is the second.

Hexadecimal to denary

Multiply the first digit by 16, then add the value of the second digit. For DA this is 13×16+10=208+10=21813 \times 16 + 10 = 208 + 10 = 218, the reverse of the conversion above.

Why hexadecimal is used

Denary to hexadecimal the other way

Some students prefer to convert denary to hex by going via binary, which avoids dividing by 16. Convert the denary number to 8-bit binary first, then split into two nibbles and convert each nibble to a hex digit. For 218: 218=11011010218 = 11011010 in binary, which splits into 11011101 (D) and 10101010 (A), giving DA. Both methods (dividing by 16, or going via binary) give the same answer, so use whichever you find more reliable, but show your working either way so method marks are available if an arithmetic slip creeps in.

A worked colour code

A common real use of hex is colour. A colour is often written as six hex digits, two each for red, green and blue, where each pair is one byte from 00 (none) to FF (255, maximum). For example FF0000 is full red, 00FF00 is full green, and FFFFFF is white (all channels at maximum). Reading FF as denary, 15×16+15=25515 \times 16 + 15 = 255, shows why FF is the largest value one byte can hold. This is exactly why hex is convenient: two readable digits stand in for the eight bits of each colour channel, so a designer can write a colour compactly instead of as a long binary string.

Try this

Q1. Convert the hexadecimal number 2F to denary. [2 marks]

  • Cue. 2×16+15=472 \times 16 + 15 = 47.

Q2. Give one reason hexadecimal is used instead of binary. [1 mark]

  • Cue. It is shorter and easier for people to read and write, with fewer transcription errors than long binary.

Exam-style practice questions

Practice questions written in the style of AQA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

AQA 20203 marksConvert the 8-bit binary number 10110110 into hexadecimal. Show your working.
Show worked answer →

Split the byte into two nibbles from the right: 10111011 and 01100110.

Convert each nibble to denary then to a hex digit. 1011=8+2+1=11=1011 = 8 + 2 + 1 = 11 = B. 0110=4+2=6=0110 = 4 + 2 = 6 = 6.

So the answer is B6. Markers reward splitting into groups of four from the right, converting each nibble correctly, and using B (not the number 11) for the high nibble.

AQA 20234 marksConvert the hexadecimal number 3E into denary, then explain one reason why hexadecimal is preferred to binary when writing memory addresses.
Show worked answer →

For the conversion, multiply the first digit by 16 and add the second: 3×16=483 \times 16 = 48, and E =14= 14, so 48+14=6248 + 14 = 62.

For the explanation, hexadecimal is far shorter and easier for people to read and write than long binary, because two hex digits replace eight binary bits. This reduces transcription errors when writing or comparing long addresses, and the conversion to and from binary is quick (one hex digit per nibble).

Markers reward the correct denary value (62) and a reason that focuses on human readability and fewer errors, not the false claim that computers work in base 16.

Related dot points

Sources & how we know this