Hexadecimal Numbers Explained: KS3 Computing

Hexadecimal (hex) is a base-16 number system that uses sixteen symbols — the digits 0–9 and the letters A–F — to represent values. Computers use it as a compact, human-readable shorthand for binary: each hex digit maps to exactly four binary digits (bits), so large binary numbers become much shorter and easier to read.

Why do computers use hexadecimal?

Computers store everything in binary (base 2 — only 0s and 1s). Binary is perfect for electronics but very cumbersome for humans. The binary number 11011010 is not instantly readable. In hex it becomes DA — just two characters that experienced programmers can interpret at a glance.

Hexadecimal is widely used in computing for:

Memory addresses — the location of every byte in RAM is written in hex (e.g. 0x1A4F).

Colour codes — web colours are hex triplets such as #FF5733 (red FF, green 57, blue 33).

Character encoding — ASCII and Unicode values are written in hex.

Machine code — low-level program instructions are displayed in hex rather than raw binary.

The DfE national curriculum for computing includes hexadecimal as part of data representation at KS3 and KS4.

What are the sixteen hex digits?

Hexadecimal needs 16 symbols, but our decimal system only provides 10 (0–9). Letters A–F fill the gap:

Decimal | Binary | Hex
0 | 0000 | 0
1 | 0001 | 1
2 | 0010 | 2
3 | 0011 | 3
4 | 0100 | 4
5 | 0101 | 5
6 | 0110 | 6
7 | 0111 | 7
8 | 1000 | 8
9 | 1001 | 9
10 | 1010 | A
11 | 1011 | B
12 | 1100 | C
13 | 1101 | D
14 | 1110 | E
15 | 1111 | F

Memorise this table — it is the key to every hex conversion.

How to convert hexadecimal to decimal

Hex is base-16, so place values are powers of 16:

16² | 16¹ | 16⁰
256 | 16 | 1

Worked example: Convert 3B from hex to decimal

3 is in the 16s column: 3 × 16 = 48

B is in the 1s column. B = 11 in decimal: 11 × 1 = 11

Total: 48 + 11 = 59

So hex 3B = decimal 59.

Worked example: Convert 1F4 from hex to decimal

1 is in the 256s column: 1 × 256 = 256

F is in the 16s column. F = 15: 15 × 16 = 240

4 is in the 1s column: 4 × 1 = 4

Total: 256 + 240 + 4 = 500

So hex 1F4 = decimal 500.

How to convert decimal to hexadecimal

Use repeated division by 16, reading the remainders from bottom to top (same method as decimal-to-binary, but divide by 16 instead of 2):

Worked example: Convert decimal 200 to hex

Division | Quotient | Remainder | Hex digit
200 ÷ 16 | 12 | 8 | 8
12 ÷ 16 | 0 | 12 | C

Read remainders bottom to top: C8

Check: (12 × 16) + 8 = 192 + 8 = 200. Correct.

Worked example: Convert decimal 255 to hex

Division | Quotient | Remainder | Hex digit
255 ÷ 16 | 15 | 15 | F
15 ÷ 16 | 0 | 15 | F

Reading bottom to top: FF

Check: (15 × 16) + 15 = 240 + 15 = 255. Correct. (This is why the maximum brightness of each RGB colour channel — 255 — is written as FF in web colour codes.)

How to convert between binary and hexadecimal

This is the conversion where hex really shines. Because 16 = 2⁴, every hex digit corresponds to exactly four bits.

To convert binary to hex:

Split the binary number into groups of 4 bits, starting from the right.

Convert each group of 4 bits to its hex digit using the table above.

Worked example: Convert binary 10110111 to hex

Split into groups of 4: 1011 | 0111

4-bit group | Binary value | Hex digit
1011 | 8+2+1 = 11 | B
0111 | 4+2+1 = 7 | 7

Result: B7

Check (decimal route): 1011 0111 in binary = 128+32+16+4+2+1 = 183. And B7 in hex = (11×16)+7 = 176+7 = 183. Correct.

To convert hex to binary: Replace each hex digit with its 4-bit binary equivalent — the reverse of the above.

Example: Convert A3 to binary

A = 10 = 1010

3 = 3 = 0011

Result: 1010 0011

Why is hex more convenient than binary for humans?

Two hex digits represent one byte (8 bits). Without hex, you would need to read and write 8-digit binary strings for every byte. With hex, a memory address like 0x7FFF0000 is manageable; its binary equivalent 0111 1111 1111 1111 0000 0000 0000 0000 is not.

The computers themselves only ever work in binary. Hexadecimal is purely a human-readable display format — a way of making binary data easier to inspect, write down, and discuss.

Frequently asked questions

What is hexadecimal in simple terms for KS3?

Hexadecimal is a base-16 counting system that uses the symbols 0–9 and A–F. Computers use it as a shorthand for binary because each hex digit represents exactly four binary digits. This makes long binary numbers much shorter and easier for humans to read and write.

How do you remember the hex values of A to F?

A = 10, B = 11, C = 12, D = 13, E = 14, F = 15. One mnemonic is to count up from A: the "Ace" is ten, and you add one for each following letter. Another approach is to memorise the full binary-to-hex table above — once you know a 4-bit binary value equals a specific hex digit, the table is its own reference.

Where do I see hexadecimal in real life?

The most visible everyday use is web colour codes: #FFFFFF is white (all channels at maximum 255 = FF), #000000 is black (all at zero), and #FF0000 is pure red. Wi-Fi MAC addresses (the unique identifier of your network card) are written in hex pairs separated by colons, such as A4:C3:F0:85:1E:3B.

Is hexadecimal on the KS3 or GCSE computing curriculum?

Both. The DfE national curriculum includes hexadecimal as part of data representation from KS3. At GCSE, students are expected to convert fluently between hex, binary and decimal, use hex in colour and ASCII contexts, and explain why hex is used as a shorthand for binary. Building fluency at KS3 makes GCSE questions on this topic straightforward.

For Socratic computing tutoring — from hexadecimal to full data representation — see aitutors.me.