← Teacher guide

Bits and binary numbers

Students turn binary cards face up to see that each place is worth double the one on its right, read and write numbers in binary, and say why computers use two states (AC9TDI8K04).

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

Classroom resources

Load these into Waypoints Prepare: choose Load URL and paste the copied address, 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 8 min · Worked example 12 min · Vary 10 min · Practise and Make 10 min

Before class

Do the Try board yourself first. If you have time, do CS Unplugged's binary cards activity with real cards before the board: five students hold the 16, 8, 4, 2 and 1 cards at the front and turn them over to make numbers. The board is the same model.

The one idea: each place is worth double the one on its right, and the number is the sum of the places holding a 1. The "why" in AC9TDI8K04 is the last Worked example task: two states are easy to tell apart reliably.

This lesson uses no code. Students who have done the coding lessons have met bits as micro:bit LEDs (on or off) and as True or False.

Running the lesson

  1. Predict: students who chose 1011 read it as a base-10 number; 3 counted the 1s.
  2. Try: ask which card is worth the most, and why it is on the left (like the thousands column).
  3. Worked example: have students say the places aloud from the right before revealing line 2.
  4. Vary: before 7 to 8, ask students to predict how many cards will change.
  5. Make: collect answers and the stretch (7, 00111): what is the difference?

The hard part (on purpose)

Reading binary as an ordinary number (1011 as one thousand and eleven). Have students say binary digit by digit ("one zero one one") and point at each card's value as they add.

When students get stuck

What you will seeA question to askThe fix
A student writes 1011 = one thousand and eleven.Which cards are face up, and what are they worth?Point at each 1 and say its card's value, then add.
A student reads 1100 as 3 (Sam's mistake).Which end is the 1 card?Write 8 4 2 1 above the digits before reading.
A student writing 13 in binary gets stuck.What is the biggest card that fits in 13?Take the 8, then 5 is left: the biggest card that fits is 4, then 1 is left.

Answers to the checks

  1. read the cards: Four cards are worth 8, 4, 2 and 1. The 8, 2 and 1 cards are face up, so the bits read **1011**. What number is that?
    11. The cards face up are 8, 2 and 1, and 8 + 2 + 1 = 11. 1011 is how it is written in binary, not one thousand and eleven.
  2. Try: turn up the cards: Click the 8, 2 and 1 cards to turn them face up, so the bits read 1011. What number does the board show?

    1011 = 8 + 2 + 1 = 11. The 4 card is face down, so it adds nothing.
  3. Read the places: Five cards are worth 16, 8, 4, 2 and 1. What number is **10011** in binary?
    19
    10011 = 16 + 2 + 1 = 19.
  4. Find the mistake: Sam reads 1100 in binary. Click the line where the working first goes wrong.
    line 2
    Line 2: the places go 1, 2, 4, 8 from the right, so the first two digits of 1100 are the 8 and 4 places. 1100 = 8 + 4 = 12.
  5. Why only 0 and 1?: Why do computers store numbers in binary, not with the digits 0 to 9?
    Each bit only needs two states (off and on, low or high voltage), which are easy to tell apart reliably
    A switch or a voltage only has to be off or on, low or high. Telling two states apart is fast and reliable even when the signal is a little weak or noisy; telling ten levels apart would not be.
  6. Make 6: Make 6. Which cards do you need?

    6 = 4 + 2, so 00110.
  7. One more: Now make 7, one more. How many cards did you have to change?

    7 = 4 + 2 + 1, so 00111. Only the 1 card changed.
  8. One more again: Now make 8, one more again. Which cards changed this time?

    8 is 01000: the 4, 2 and 1 cards all went down and the 8 went up, because 4 + 2 + 1 = 7 and the next number needs the next card. It is like 999 + 1 = 1000.
  9. Use the 16: Make 19 using the 16 card.

    19 = 16 + 2 + 1, so 10011.
  10. Number to binary: Write 13 in binary with four bits (places 8, 4, 2, 1).
    1101
    13 = 8 + 4 + 1, so the 8, 4 and 1 cards are up and the 2 card is down: 1101.
  11. Four bits: What number is **1001** in binary?
    9
    1001 = 8 + 1 = 9.
  12. Zeros on the right: What number is **11000** in binary?
    24
    11000 = 16 + 8 = 24. The three 0s on the right add nothing.
  13. Number to binary: Write 20 in binary with five bits.
    10100
    20 = 16 + 4, so 10100.
  14. All ones: What number is **11111** in binary?
    31
    16 + 8 + 4 + 2 + 1 = 31, the biggest number five cards can show.
  15. Review: powers of 2: Review: what is 242^4?
    16
    2 × 2 × 2 × 2 = 16. The binary places are powers of 2: 1, 2, 4, 8, 16 are 202^0 to 242^4.
  16. three cards up: The number is hidden. Turn up exactly three cards to make the biggest number you can, then work it out.

    16 + 8 + 4 = 28, so 11100. The left cards are worth the most.

Solutions

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

Vary: one change at a time › Make 6

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

Vary: one change at a time › One more

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

Vary: one change at a time › One more again

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

Vary: one change at a time › Use the 16

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

Vary: one change at a time › Number to binary

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

three cards up

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

Stretch and support

Stretch: Count from 0 to 15 in binary on four cards. Which card flips every time? Which flips every second time? Every fourth?

Support: Keep the card values (16 8 4 2 1) written above every binary number until reading them is automatic.

Exit ticket

What is 10101 in binary? Write 12 in binary.

10101 = 16 + 4 + 1 = 21. 12 = 8 + 4 = 1100.

What each step is for

Where it leads

Next: How many patterns? (how many numbers a set of bits can hold, and overflow).

Where it leads: the 0 to 255 limits students met in text, colours and sound come from bits (How many patterns?). Later: why binary (logic gates) and how bits underpin every encoding. In maths, the places are powers of 2, as base-10 places are powers of 10.

Sources