← Teacher guide

Hex: binary in fours

Students group binary cards in fours to read and write hex, see that one hex digit is exactly four bits and a byte is two hex digits, read web colours, and meet hex as a public rule (AC9TDI8K04 node 1, binary representation of integers, written short). Optional; Encoding is not encryption (Capture the flag) decodes hex and is the natural place to point students who skipped it.

Data representation · Binary numbers · about 35 minutes · Open the student lesson

Classroom resources

Open these in Waypoints Prepare with one click. To share a file another way, copy its address and paste it into Load URL, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.

Students will be able to

Timing

Predict and Try 6 min · Worked example 10 min · Vary 8 min · Practise and Make 11 min

Before class

Do the boards yourself first. Students need Bits and binary numbers and How many patterns? (four bits make 16 patterns).

The one idea: four bits make exactly 16 patterns, so one hex digit stands for four bits, and two hex digits for a byte. Hex is binary written short, not a new kind of number.

Added 25 Oct 2026 to answer the roadmap's open question (hex in the colour lesson, or Years 9–10?): an optional lesson after How many patterns, with one line in Colour and images. It is optional because the descriptor doesn't name hex. Encoding is not encryption (Capture the flag) uses hex but doesn't list it in assumes:, since an optional lesson can't satisfy that check.

Running the lesson

  1. Predict: students who chose 1515 read each F as 15 and joined them; ask how many cards each F stands for.
  2. Try: ask how many hex digits a byte needs, and why never three.
  3. Worked example: ask what the left digit counts.
  4. Make: let students work out 200 on paper first, then check with the cards.

In class

On the slides at these points. Students can do the whole lesson on their own; these are for the room. In the deck, the Run, Modify and Make slides have the live playground in them (the tutorial link is the backup), and the notes above are in each slide's speaker notes.

The hard part (on purpose)

Joining the two digits like decimal (1F as 115). Every time, ask what the left digit counts: sixteens.

When students get stuck

What you will seeA question to askThe fix
A student reads 1F as 115 (Sam's mistake).What does the left digit count?Sixteens: 1 × 16 + 15 = 31.
A student thinks B is 2.Which hex digit comes after 9?A is 10, so B is 11.

Answers to the checks

  1. what is FF?: In the web colour #FF8800, each pair of characters is one number from 0 to 255. What number is FF?
    255. Each F is four bits all on (1111, which is 15), so FF is eight bits all on: 11111111, 255.
  2. Try: every card up: Turn every card face up. What does the hex under each group of four say?

    Each group of four is 8 + 4 + 2 + 1 = 15, which hex writes as F. FF is 255: two digits instead of eight.
  3. A byte, two digits: Hex digits go 0 to 9, then A, B, C, D, E, F for 10 to 15. What number is hex B?
    11
    A is 10, so B is 11.
  4. Find the mistake: Sam reads a hex number. Click the line where it first goes wrong.
    line 3
    Line 3: in hex, the left digit counts sixteens, not tens. 1F is 1 × 16 + 15 = 31, which is 0001 1111 in binary.
  5. Byte to hex: Write the byte 0011 1100 in hex.
    3C
    0011 is 3 and 1100 is 12, written C: 3C.
  6. 0F: Make the hex read 0F.

    The right group all up (F), the left all down (0): 0000 1111, 15.
  7. 80: Now make it read 80.

    8 is 1000, and 0 is 0000: only the 128 card is up.
  8. A3: Make it read A3.

    A is 1010 and 3 is 0011: 1010 0011, which is 128 + 32 + 2 + 1 = 163.
  9. A web colour: In #FF8800, red is FF, green is 88 and blue is 00. What number is the green, 88?
    136
    8 × 16 + 8 = 136. So #FF8800 is red 255, green 136, blue 0: orange.
  10. Hidden?: A message in a file reads 6869. It's hex. Is it hidden from someone who copies the file?
    No: anyone can turn hex back
    Hex is a public rule, so anyone can turn it back: 68 is h, 69 is i. Hex is an encoding, not encryption. The Capture the flag course starts here.
  11. Review: binary: Review: what number is the binary 1011?
    11
    8 + 2 + 1 = 11, which is B in hex.
  12. the badge colour: The club badge's red value is 200. Set the cards so they hold 200, and read its hex. (The number is hidden: use the hex.)

    200 = 12 × 16 + 8: C8, which is 1100 1000.

Solutions

One possible solution for each task. Other correct programs are fine.

Vary: make the hex › 0F

Open task: any program that does what the step asks.

Vary: make the hex › 80

Open task: any program that does what the step asks.

Vary: make the hex › A3

Open task: any program that does what the step asks.

the badge colour

Open task: any program that does what the step asks.

Stretch and support

Stretch: Memory addresses are often written in hex, like 0x7FFF. How many bits does each hex digit stand for, so how many bits is that address?

Support: A card: 0–9 as usual, A 10, B 11, C 12, D 13, E 14, F 15. One hex digit = four bits; two = a byte.

Exit ticket

Write 1010 1111 in hex, and say what number it is.

AF: A is 10, F is 15, so 10 × 16 + 15 = 175.

What each step is for

Where it leads

Next: Why binary: logic gates.

Links: Colour and images (RGB values), Capture the flag › Encoding is not encryption (hex as a public rule).