Ελληνικά

Hexadecimal: Counting in 16s 🔢

Long binary numbers are hard for people to read, so programmers use hexadecimal (hex for short). Every hex digit stands for exactly 4 bits. Explore how hex, binary and denary connect, practise conversions, and mix colours using real hex codes. Ages 11-14.

One byte, three ways

Denary (our normal numbers) uses 10 digits. Binary uses 2. Hexadecimal uses 16: 0 to 9, then A to F for 10 to 15. Move the slider and watch how one byte looks in each system.

Denary
Binary
Hex

Split the byte into two nibbles

4 bits are called a nibble. Each nibble turns into one hex digit.

Left nibble
Right nibble

The 16 hex digits

Why use hex? The byte 10101111 is easy to misread, but AF is short and clear. Computers still work in binary. Hex is just a handy way for people to write binary, used for colour codes, error codes and memory addresses.

Convert it

Score: 0 ·

Methods: Hex → denary: first digit × 16, plus second digit. Denary → hex: divide by 16; the answer is the first digit and the remainder is the second. Binary ↔ hex: work in groups of 4 bits.

Hex colour mixer

Every colour on a screen is a mix of red, green and blue light. Each one goes from 0 (none) to 255 (full), which is one byte, or two hex digits. Web designers write colours as #RRGGBB.

Read the code 🎨

Which swatch matches the hex code? Think about how much red, green and blue each pair gives. Score: 0 ·

Hexadecimal Quiz

10 questions. Score: 0 · Question 1 of 10

New to binary? Start with Binary: 1s and 0s, then come back here.

Browse printable worksheet packs in the shop →