Back to computer sciencecomputing use cases

Computer ScienceComputingMiddle schoolKey Stage 3

How to teach binary numbers

Binary numbers use only the digits 0 and 1, and each place is worth double the place to its right. This page explains how to read and write them, with a free activity where students flip binary cards to write their age and initial while Sparky checks each count.

Title card reading 'How to teach binary numbers', next to three chat cards: a student calls 001101 twelve, Sparky asks him to add 8 + 4 + 1, the cards he flipped, and he later finds that the biggest number is always one less than the next card.

"All teachers would benefit from self-paced socratic-style tutoring that can be available twenty-four hours a day. Once a teacher is trained on how to use this product well, it opens the door to an exciting future of education possibilities."

Spencer WagnerSpencer Wagner, AP Computer Science teacher at Regis Jesuit

Why this matters

A middle schooler who sees 101 reads it as one hundred one, because every number they have written so far is in base ten. They can copy a conversion chart and still not know why the places go 1, 2, 4, 8. A class demo with five students holding cards moves at one pace for the whole room, and the teacher has to wait for quiz day to find out who can explain why each card doubles.

How binary numbers work

Binary numbers use two digits, 0 and 1, and computers store numbers, letters and pictures as bits, short for binary digits (CS Unplugged). Each place in a binary number is worth double the place to its right: 1, 2, 4, 8, 16, 32. To turn binary into decimal, add the place values that hold a 1, so 101 is 4 + 1, which is 5. Each place is worth one more than all the places to its right added together, so every whole number has exactly one binary spelling. Letters become binary once each one has a number: in ASCII, the character code computers have used since the 1960s, a capital A is 65, or 1000001 (ASCII on Wikipedia).

In the Flint activity, each student flips six binary cards from the CS Unplugged lesson in an interactive Sparky built, and writes 101, their age and the first letter of their name in binary. A worksheet marks a wrong count with an X, and Sparky answers it by asking the student to add up only the cards they flipped.

Sparky gets Theo to catch his own binary mistake

Theo fixes his own wrong count, then works out why the biggest number is one less than the next card. Every student gets the same cards and steps, and Sparky's replies depend on each student's own answers.

Sparky sends Theo back to his own cardsA right answer gets a harder question
T

Theo

Interest: Redstone lamps in MinecraftStarting point: Reads 101 as one hundred one

Sparky

Each card below is worth its number of dots: 32, 16, 8, 4, 2 and 1. Click a card to flip it face up (1) or face down (0).
An interactive Sparky made in the chat, titled Binary Cards. Six dark cards are labeled 32, 16, 8, 4, 2 and 1, each with a 0 under it, above a box that reads Binary: 000000 and a Reset button.
InteractiveBinary Cards

Theo

i flipped the 8, the 4 and the 1. so 001101 = 12
The Binary Cards interactive with the 8, 4 and 1 cards face up and the 32, 16 and 2 cards dark. The Binary box reads 001101.
InteractiveTheo's cards for his age

Sparky

Check your dot total. 8 + 4 + 1 equals what?

Theo

oh 8+4+1 is 13. 001100 is 12

Sparky

Ready for the harder challenge: what's the biggest number you can make with just 5 cards?

Theo

all 5 face up, 11111. 16+8+4+2+1 = 31

Sparky

Now flip all 6 cards face up. What's the biggest number you can make, and do you notice a pattern between the max for 5 cards and 6 cards?

Theo

31 is one less than 32 and 63 is one less than 64. so the biggest number is always one less than the next card you dont have

Fixed his own count, then found the biggest number 6 cards make

Theo is an example student, and the chat is shortened.

What Flint did for Theo

  • Sparky built the binary cards into the greeting with no total shown, so Theo counted every number himself.
  • When Theo called 001101 twelve, Sparky asked him to add 8 + 4 + 1, the cards he flipped.
  • A right count got a harder question, and Theo found the biggest number is one less than the next card.

A teacher can't do this by hand for 30 students, and Sparky does it in every student's chat.

The activity page shows who still counts face-down cards

While students flip their cards, Needs attention tells the teacher which student is stuck and on which message. Once three or more students submit, activity analytics lists what the class explained well, the mistakes students made, and a follow-up to practice next.

Flint's activity page for the binary cards activity. Needs attention flags a student who read 110 as one hundred ten. Activity analytics says 15 students explained that each card is one more than all the cards to its right, 8 students added a face-down card to their total, and suggests decoding a three-letter word with the A=1 code next. The Sessions table lists three students.

Example activity page

After a computer science class writes their ages in binary

The school and students are made up for this page.

Set up the activity for free

The binary cards activity is in Flint's public library, with the six cards, Sparky's guidelines and the greeting already written. Open it, select Use activity to copy it into a free Flint account, and assign it to a class. In the activity's Preview tab, select Try session myself to flip the cards as a student before your class does.

For more computer science activities, see Flint for computer science.

Other use cases

See all use cases →

Learning feels different when it fits you.