GCSE · Computer Science · Edexcel · Spec 1CP2

7-bit ASCII

Your phone never stores the letter A. It stores a pattern of 0s and 1s. So how does it know to show an A, and not a B?

Computer Science · Data representation

Text is just numbers in disguise

64 + 1 = 65

7-bit binary 1000001 = 65 in denary

Code (denary)65
Mission: turn A (65) into B, then into a.

Mission 1: start on A (65) and count up to B (66) and C (67). Mission 2: from A, flip just one bit to land on a (97). The grid only shows a number; ASCII is what says 65 stands for A, 66 for B and 97 for a.

Watch out: Adding one in binary: the right-hand 1 flips to 0 and carries left, so 1000001 + 1 = 1000010. The switch worth 32 is the case switch: off for A, on for a.

Computer Science · Bits

How many codes can 7 bits make?

How many different patterns can a sequence of 7 bits make? Drag to your best guess, then lock it in.

Your estimate

100 patterns

0 patterns200 patterns

Character sets

?

Reason it through

Why do computers need to use the same character set?

Link 1 of 4

First link · your turn

Computers store binary sequences. So how can one store the letter H?

2
Locked — reveal the link above first
3
Locked — reveal the link above first
4
Locked — reveal the link above first

Computer Science · Storing text

How many bits does a text need?

How many bits does the text "Hello world" need when it is stored in 7-bit ASCII? Fill the gaps in the method.

  1. The text is "Hello world", stored in 7-bit ASCII.
  2. missing step
Which line is step 2?

Computer Science · Limits of ASCII

In ASCII, or not?

Pick a character, then pick where it belongs.

Still to sort

In 7-bit ASCII (0)

English letters, digits, punctuation, the space and control characters.

Where the line is: If it is an English letter, a digit, punctuation, the space or a control character such as enter or tab, ASCII has a code for it.

Needs a larger character set (0)

Letters from other alphabets need a set such as Unicode.

Where the line is: ASCII is not designed for the alphabets of other languages, so a larger set that represents more characters is needed.

8 of 8 still to sort.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

How a computer turns letters into 0s and 1s, and what it can't turn.

What you need to know

  • A bit is a binary digit, either 0 or 1.
  • Each extra bit doubles the states, so n bits give 2^n: 2 bits make 4, 3 bits make 8, 7 bits make 128.
  • Have a go1 bit gives 2 states, 2 bits give 4, 3 bits give 8. How many states do 4 bits give?

    16

    Each extra bit doubles the number of states, so 8 × 2 = 16. It doesn't just add 2.

  • Think of a character set as a record matching each character to a unique binary sequence.
  • Devices must use the same character set, so one sequence means the same character everywhere.
  • 7-bit ASCII is a standard character set: each character gets its own 7-bit code, so there are 128 possible characters.
  • Have a goMaya says 7-bit ASCII could have 200 different characters, because 'there's loads of room'. Use the power of 2 to show her.

    7 bits give only 2^7 = 128 codes, so 200 characters won't fit.

    Every character needs its own unique code, and a 7-bit sequence can only make 128 different ones.

  • It covers English upper-case and lower-case letters, digits, punctuation, the space, and control characters such as enter and tab.
  • Letters are in alphabetical order and their codes count up, so the next letter has the next binary number.
  • Have a goSuppose a letter's code is 1000100. What is the code of the next letter in the alphabet?

    1000101

    The next letter has the next binary number, so add 1: the right-hand 0 becomes 1 and nothing carries.

  • Capital and lower-case versions of a letter have different codes, differing in only one bit.
  • Every ASCII character has a fixed-length code, so c characters need c × 7 bits: 11 characters need 77 bits.
  • ASCII is built for English letters, numbers and symbols, so other alphabets need a larger set such as Unicode.

The big picture

Computers store text as binary. A character set matches each character to a unique binary sequence, and devices must use the same one. In 7-bit ASCII every character has its own 7-bit code, giving 128 possible characters. Letters are coded in counting order, a capital and its lower-case partner differ in one bit, and a text of c characters needs c × 7 bits. ASCII is not designed for other alphabets; Unicode is a larger character set.

Key points

1n bits can take 2^n states. Each extra bit doubles the number, so 7 bits give 128.
2A character set matches each character to a unique binary sequence, and devices must share one so a sequence means the same character everywhere.
3In 7-bit ASCII each character has a unique 7-bit code. Letters are in counting order, and a capital and its lower-case partner differ in only one bit.
4A text of c characters in 7-bit ASCII needs c × 7 bits. Count the spaces.
5ASCII covers English letters, digits, punctuation, the space and control characters, but is not designed for other alphabets. Unicode is a larger set.

Worked example

Problem

In 7-bit ASCII the code for the capital letter F is 1000110. Find the code for G, and the code for lower-case f.

⚠ Watch out

Two slips: leaving out the spaces when counting characters for storage, and thinking ASCII can show any character on any keyboard. A space is a character with its own code, and ASCII is built for English letters, digits and symbols, not other alphabets.

🧠

Memory hook

Seven bits, 128 codes. Next letter, next number. Capital to small, flip one switch.

✓

Check yourself

Cover the page. "Hi there!" is stored in 7-bit ASCII: how many bits does it need? Then explain in your own words why two devices must share a character set.

Flashcards

(13)
What is a bit?
A binary digit with the value 0 or 1.
How many states can an n-bit binary sequence take?
2^n. Each extra bit doubles the number of possible states.
How many states can a 7-bit sequence take?
2^7 = 128.
What is a character set?
A record of characters, each matched to a unique binary sequence.
Why must computers use the same character set?
So that a binary sequence stands for the same character on every device.
What does ASCII stand for?
American Standard Code for Information Interchange. It is a standard character set.
How are characters represented in 7-bit ASCII?
Each character has its own unique 7-bit binary code, giving 128 possible characters.
Which characters does 7-bit ASCII represent?
English upper-case and lower-case letters, digits, punctuation, the space and control characters such as enter and tab.
How do the codes for a capital and its lower-case letter compare?
They are different codes, and they differ in only one bit (the bit worth 32). For example A = 1000001 and a = 1100001.
How are the codes for consecutive letters related?
The letters are in alphabetical order and the codes count up, so the next letter has the next binary number.
How many bits does a text of c characters need in 7-bit ASCII?
c × 7 bits, because every code has the same fixed length.
Why is a 7-bit sequence about the right size for a keyboard?
It gives 128 codes and a standard keyboard has roughly 100 keys. This is a sizing argument, not a claim that every keyboard character is in ASCII.
What can't ASCII do?
It isn't designed for the alphabets of other languages, so it can't show them correctly. Unicode is a larger character set that represents more characters.

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.