GCSE · Computer Science · Edexcel · Spec 1CP2
Maximum states from a binary pattern
How many bits give every letter of the alphabet its own code? Fewer than you'd think, but more than four. Grow the patterns bit by bit and see why.
Computer Science · Binary
Grow the states, one bit at a time
Pick bit 1, then bit 2, then bit 3. Watch how many ends the tree has after each layer.
Bit 1 → Bit 2 → Bit 3
2 × 2 × 2 = 8 possible states, and the tree ends 8 times.
Each layer is one more bit, and every bit is a 0 or a 1. Walk down to an end and count the ends as you go.
Computer Science · Listing states
List every 3-bit state in counting order
Start at 000 and work through all 8 states. Change the right-most bit first, every time.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
How many different patterns can n bits make, and how many bits do you need?
What you need to know
- A bit can only be 0 or 1, so one bit has two states. A state is just its value at a point in time.
- A binary sequence of n bits has a maximum of 2^n different states.
- So 2 bits give 4 states, 3 bits give 8, 4 bits give 16 and 5 bits give 32.
- Each extra bit doubles the states, because every existing state can be joined with a 0 or a 1.
Have a goYour mate says, "A 3-bit sequence has 8 states, so a 4-bit one has 4 states." Confidently wrong. What is the real number?
16 states.
Adding the 4th bit doubles the 8 states from 3 bits. Every extra bit does the same, so the number of states depends on how many bits there are.
- Short sequences can be listed in counting order, with the right-most bit changing first.
Have a goList every state of a 2-bit sequence in counting order, with the right-most bit changing first.
00, 01, 10, 11
The right-most bit changes on every step. A tempting wrong list changes the left-most bit first, giving 00, 10, 01, 11.
- Long sequences are too hard to list, so use the formula: number of states = 2^n.
- To find the bits needed for some values, find the smallest n where 2^n is at least that many.
Have a goYou need 12 different states. Do 3 bits do the job? If not, how many bits do?
No. 3 bits give 8, so 4 bits (16 states).
8 is too few, so 3 bits fall short. Stop at the first n where 2^n is at least 12; going to a bigger n than needed is not the smallest.
- A sequence can be a number, sound, letter or instruction; its number of states depends only on its length.
The big picture
A bit can only be 0 or 1. A sequence of n bits has at most 2^n different states, because every extra bit doubles the count. You can use that to work out how many bits are needed for a given number of values.
Key points
Worked example
Problem
How many different states can a 6-bit binary sequence have? Find it by doubling, then check it with the formula.
⚠ Watch out
Thinking n bits give n states, or that each bit adds two more. Each bit doubles the count, so n bits give 2^n states. Also, 2^n is 2 multiplied by itself n times, not 2 × n and not n squared.
Memory hook
Add a bit, double the states.
Check yourself
Without looking back: how many states do 3 bits give, and what happens to that number if you add one more bit? Then explain in a sentence why it is not just 8 + 2.
Flashcards
(13)What is a bit?
What is the state of a bit?
How many states does an n-bit binary sequence have at most?
How many states do 2, 3, 4 and 5 bits give?
Why does each extra bit double the number of states?
In what order can the states of a short sequence be listed?
Why use 2^n instead of listing the states?
How do you find the number of bits needed for some values?
Why are 4 bits not enough to give all 26 letters their own sequence?
Why do 16 different values need 4 bits and not 3?
About 104 keys each need their own binary sequence. How many bits?
Does what a sequence represents change its number of states?
Name four things the same binary sequence could represent.
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore Edexcel GCSE Computer Science topics
How this lesson was checked. This Edexcel GCSE Computer Science (specification 1CP2)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 21 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.