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
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.
Character sets
Reason it through
Why do computers need to use the same character set?
First link · your turn
Computers store binary sequences. So how can one store the letter H?
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.
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
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?
How many states can an n-bit binary sequence take?
How many states can a 7-bit sequence take?
What is a character set?
Why must computers use the same character set?
What does ASCII stand for?
How are characters represented in 7-bit ASCII?
Which characters does 7-bit ASCII represent?
How do the codes for a capital and its lower-case letter compare?
How are the codes for consecutive letters related?
How many bits does a text of c characters need in 7-bit ASCII?
Why is a 7-bit sequence about the right size for a keyboard?
What can't ASCII do?
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.