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.

On No bits yet. 2 branches to choose from.

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.

Exam line: Every extra bit splits each existing state into two, so the number of states doubles. That is why n bits give 2^n states.
Watch out: Nothing here is chance. The tree only counts what is possible: each end is one different state.

Computer Science · Listing states

List every 3-bit state in counting order

3-bit binary 000 = 0 in denary

Position in the list (counting from 0)0
Flip bits to step through the list. Can you reach all 8 states?

Start at 000 and work through all 8 states. Change the right-most bit first, every time.

Exam line: Short sequences can be listed in counting order, with the right-most bit changing first. Long ones are too big to list, so use 2^n instead.
Watch out: The number shown is just where the state sits in the list, counting from 0. It is not the number of states. A 3-bit sequence still has 8 states.

Computer Science · How fast does it grow?

How many states can 7 bits take?

A 3-bit sequence has 8 states and a 5-bit sequence has 32. How many different states does a 7-bit sequence have?

Your estimate

100 states

0 states200 states

Exam line: The count doubles with every bit, so a few bits give a great many states: 7 bits give 2^7 = 128.

Computer Science · Working backwards

How many bits give every letter its own code?

All 26 letters of the alphabet each need their own binary sequence. How many bits are needed?

  1. We need at least 26 different states, so we want the smallest n where 2^n is 26 or more.
  2. missing step
Which line is step 2?

Exam line: To find how many bits you need, find the smallest n where 2^n is at least the number of values. Reject any n that falls short.

Computer Science · Which idea is right?

Three friends, three ideas

Your friends are arguing about how many different states a 4-bit binary sequence can have.

Which idea is closest to what you think?
How sure are you?

Exam line: The number of states of an n-bit sequence is 2^n, and it depends only on the length of the sequence.

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

1A bit is a binary digit. It can only be 0 or 1, so one bit has two states.
2An n-bit binary sequence has a maximum of 2^n different states.
3Each extra bit doubles the number of states, because every existing state can be joined with a 0 or a 1.
4To find how many bits a number of values needs, find the smallest n for which 2^n is at least that number.
5The number of states depends only on how long the sequence is, not on what it represents.

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?
A binary digit, which can only have the value 0 or 1.
What is the state of a bit?
Its value at a point in time.
How many states does an n-bit binary sequence have at most?
2^n.
How many states do 2, 3, 4 and 5 bits give?
4, 8, 16 and 32 states.
Why does each extra bit double the number of states?
Every existing state can be joined with the new bit, which itself has two states (0 and 1).
In what order can the states of a short sequence be listed?
Counting order, with the right-most bit changing first.
Why use 2^n instead of listing the states?
The longer the sequence, the more states there are and the harder they are to list.
How do you find the number of bits needed for some values?
Find the smallest n where 2^n is at least the number of values.
Why are 4 bits not enough to give all 26 letters their own sequence?
2^4 gives only 16 states, which is fewer than 26.
Why do 16 different values need 4 bits and not 3?
With 3 bits there are only 8 ways to combine the bits.
About 104 keys each need their own binary sequence. How many bits?
7 bits, because 2^7 gives 128 different sequences.
Does what a sequence represents change its number of states?
No. The number of states depends only on the length of the sequence.
Name four things the same binary sequence could represent.
A number, a sound, a letter or an instruction, depending on how the computer treats it.

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 posted

More Edexcel GCSE Computer Science topics

See the full Edexcel Computer Science curriculum →

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.