Choose a country
Grade 6Computer scienceThe computer

Encoding numbers

Lesson goal: Explain that computers store numbers in binary, know what a bit and a byte are, and convert small numbers between decimal and binary.
← The computer

About this lesson

In everyday life we use the decimal system: ten digits (0–9), with each place worth 10 times the one before. A computer works with electrical signals: a signal is either on (1) or off (0). So everything in a computer — numbers, text, pictures — is encoded with just two digits, 0 and 1. This is the binary number system. One binary digit is a bit; 8 bits make 1 byte. In a binary number the place values double from right to left: 1, 2, 4, 8, 16, 32, 64, 128. To convert binary to decimal, add the values of the places holding 1: 1101 → 8 + 4 + 0 + 1 = 13. To convert decimal to binary, keep dividing by 2, write down the remainders, then read them from last to first: 13 ÷ 2 = 6 r 1, 6 ÷ 2 = 3 r 0, 3 ÷ 2 = 1 r 1, 1 ÷ 2 = 0 r 1 → 1101. Another way: take away the largest place value that fits: 13 = 8 + 4 + 1 → 1101. Adding a 0 to the end of a binary number doubles it: 11 (three) → 110 (six). One byte can hold 256 different numbers, from 0 to 255.

Lesson goal: Explain that computers store numbers in binary, know what a bit and a byte are, and convert small numbers between decimal and binary.

What the book shows

In grade 6 the computer science textbook covers how a computer is built and works, encoding numbers, electronic presentations, the properties of algorithms and loops, variables in programs, and email. Each topic gives a short explanation, an example and a task done on or off the computer.

Textbook link:

This is not the textbook’s text but a short description of the topic. Check the exact page in your own textbook.

The lesson step by step

  1. 1

    Warm-up5 min

    Lit and unlit bulbs.

  2. 2

    New topic10 min

    Decimal and binary.

  3. 3

    Practice10 min

    Bits and bytes.

  4. 4

    Game10 min

    Ways to convert.

  5. 5

    Wrap-up5 min

    A worked example.

Let’s understand

For the student Simple language

DecimalBinaryPlace values
111
2102
51014 + 1
810008
1311018 + 4 + 1
8 bits = 1 byte

Going deeper

Scientific language: for older students, parents and teachers.

The German scholar Gottfried Leibniz described the binary system in detail around 1700 — long before computers.

Play and check

Which decimal number is it?

How to write it down

  1. Write the numbers 1 to 16 in binary.
  2. Convert 17, 33 and 82 to binary.
  3. Convert 10110 and 11111 to decimal.

How the classwork looks in the notebook

15 November1Classwork2decimal: 0–9 · binary: 0 and 1 · bit = one binary digit; 8 bits = 1 byte · place values: 1, 2, 4, 8, 16, 32, 64, 128 · binary → decimal: add the values of the 1s · decimal → binary: divide by 2, read remainders from the end · 1 byte: 0–2553
Writing order: 1 Date 2 Heading 3 Line 3: decimal: 0–9 · binary: 0 and 1 · bit = one binary digit; 8 bits = 1 byte · place values: 1, 2, 4, 8, 16, 32, 64, 128 · binary → decimal: add the values of the 1s · decimal → binary: divide by 2, read remainders from the end · 1 byte: 0–255
Sample: the date and heading follow this country’s notebook rules.

Open notebook

Watch out: common mistakes

Reading the remainders from the start. Read them from last to first.
Reading binary 10 as “ten”. In binary 10 is “one-zero”, which is two.

Where it helps in life

  • Electronic presentations

At home

Core

  1. Write your age and the day of your birthday in binary.

Extra ⭐

  1. What is the largest number five bulbs can show? Explain.

How to do it

  1. Do the task with a grown-up.
  2. Explain in words what you noticed.
Answers for parents

17 = 10001, 33 = 100001, 82 = 1010010. 10110 = 16 + 4 + 2 = 22; 11111 = 16 + 8 + 4 + 2 + 1 = 31. Five bulbs: 11111 = 31.

Step-by-step homework solution — Show the solution (try it yourself first)
  1. Step by step

    1. Convert 25 to binary. 25 ÷ 2 = 12 r 1; 12 ÷ 2 = 6 r 0; 6 ÷ 2 = 3 r 0; 3 ÷ 2 = 1 r 1; 1 ÷ 2 = 0 r 1. Read the remainders from the end: 11001. Check: 16 + 8 + 1 = 25.

How the homework looks in the notebook

15 November1Homework2Binary code3
Writing order: 1 Date 2 Heading 3 Line 3: Binary code
Sample: the date and heading follow this country’s notebook rules.

Check yourself