Binary numbers and representing text
A computer stores everything as two states. Once you can convert between denary and binary, file sizes and character sets stop being mysterious.
Lesson overview
What you'll learn in this lesson
Understand how numbers can be represented in binary, and be able to carry out simple operations on binary numbers
Key learning points
- • Place value in base two
- • Binary addition
- • Overflow
- • From numbers to text
This lesson at a glance
- 30 minutes
- 19 parts to scroll through
- 4 quick checks
- Marked quiz at the end
- Gentle pace: short sittings with pauses
Words to know
Scroll down — the lesson carries on below
Watch & discover
Part 1 of 19
Watch first
Binary numbers and representing text
Discover how a string of 1s and 0s becomes the letters you type.
In a nutshell
Understand how numbers can be represented in binary, and be able to carry out simple operations on binary numbers
What you already know
Part 2 of 19
Before we start
What you already know
You should already know place value in base ten and that computers use switches that are on or off.
Key words
Part 3 of 19
Key words
Words you'll need today
- Bit
- A single binary digit, 0 or 1.
- Byte
- Eight bits, enough for 256 different patterns.
- Denary
- Ordinary base-ten counting.
- Overflow
- When a result needs more bits than are available.
- Character set
- An agreed mapping from characters to binary codes, such as ASCII.
Learning cycle
Part 4 of 19
Learning cycle 1 of 2
Counting in twos
A short piece of teaching, then a check to make sure it has landed.
Explore the idea
Part 5 of 19
Learn
Place value in base two
In an eight-bit number the column headings are 128, 64, 32, 16, 8, 4, 2, 1. To convert 37 you take the biggest heading that fits (32), then 4, then 1: 00100101. Converting back is simply adding the headings above each 1.
Explore the idea
Part 6 of 19
Learn
Binary addition
The rules are 0+0=0, 0+1=1, 1+1=10 (write 0, carry 1) and 1+1+1=11 (write 1, carry 1). Line up the columns exactly as you would in denary, working right to left.
Quick check
Part 7 of 19
Quick check
What is 00101101 in denary?
Quick check
Part 8 of 19
Quick check
What is 1011 + 0110 in binary?
Reset break
Part 9 of 19
Pause
That's sitting 1 of 2 done
Stretch, get a drink, look out of the window. There is no timer and nothing is counting down — your place is saved, so you can come back in five minutes or tomorrow.
Learning cycle
Part 10 of 19
Learning cycle 2 of 2
Adding, overflow and characters
A short piece of teaching, then a check to make sure it has landed.
Explore the idea
Part 11 of 19
Learn
Overflow
If you only have eight bits, 11111111 + 1 needs a ninth. The carry falls off the end and the answer wraps to 00000000, which is wrong. Real systems detect this with an overflow flag; it is a limit of the storage, not of the arithmetic.
Explore the idea
Part 12 of 19
Learn
From numbers to text
Characters are stored as numbers. In ASCII, 'A' is 65 and 'a' is 97, so the gap between an upper- and lower-case letter is always 32. Unicode extends the idea to tens of thousands of characters, which is why one emoji can take more bytes than one letter.
Quick check
Part 13 of 19
Quick check
Overflow happens when...
Quick check
Part 14 of 19
Quick check
In ASCII, if 'A' is 65 then 'C' is...
Common mix-ups
Part 15 of 19
Common mix-ups
Things people often get wrong
- Binary 10 is two, not ten.
- Eight bits give 256 patterns (0–255), not 255 patterns.
- Text is not stored 'as letters' — it is stored as numbers using an agreed character set.
Challenge round
Part 16 of 19
Game · Sort it
Which of these are true?
Drag each card into the right column. Tap a card first if dragging is fiddly.
True
Not true
Challenge round
Part 17 of 19
Game · Fill the gaps
Finish the sentences
Choose the word that belongs in each gap.
Characters are stored as ____.
Mastery quiz
Part 18 of 19
Marked quiz
End of lesson quiz: Binary numbers and representing text
6 questions, marked with the reasoning shown. No timer.
1. How many patterns can 8 bits hold?
2. Denary 9 in binary is...
3. A byte is...
4. 1 + 1 in binary gives...
5. Unicode exists because...
6. Lower-case 'a' in ASCII is...
Lesson round-up
Part 19 of 19
Lesson round-up
Ready when you are
Quiz score
Not sat
Games
Not played
Points this lesson
0
Best run
0 in a row
Luna: 0 out of 4 on the practice checks. Only if you feel up to it — one more?
Ask LunaDo the work
Your written work for this lesson
This is the part you'd do in your book at school. Pick the pieces below, write here or on paper, and photograph anything you draw or work out.
How a supermarket checkout knows the price
When a barcode is scanned, the checkout does not store the price itself. It sends the barcode number to a database and reads back a record: product name, price, whether it needs an age check. The record is the single place the price lives, so changing one row changes every till in the shop at once.
Problems come from bad data, not bad scanners. If two products share a barcode, or a price update reaches the shop overnight but the till holds an old copy in its cache, customers are charged the wrong amount. Shops check this with test transactions: scan a known item, expect a known price, record what actually happened.
Good systems also log every scan. If a customer complains, the log shows exactly which record was used and when.
Written for Good Learning Co.
Reading questions
- Write in your own words what the checkout sends and what it receives back.
- Explain one way bad data could cause a wrong price, and how logging helps find it.
- Design a test table with four tests for a new checkout, with expected and actual results.
Reading and notes
ReadingRead the lesson text again and note the key terms and how each one is used, in your own words — as you would for revision.
Half a page of notes
Extended writing
WritingExplain a real system that uses this idea — how it works, where it can go wrong, and how you would make it safer or better.
250–350 words
Algorithm on paper
DiagramWrite your steps out as pseudocode or a flowchart before you type anything, then photograph it.
1 flowchart or 10 lines
Code write-up
WritingCopy your code in, then explain underneath what each part does and what you had to fix.
Code + 5 sentences
Test table
Working outMake a test table: what you tried, what you expected, what actually happened.
4–6 tests
Saved as you type.
Part 1 of 19 · Watch & discover
