GCSE · Computer Science · OCR · Spec J277
Character set
A computer only stores 0s and 1s. So how does it know one pattern is a Q and another is a smiley? Somebody had to agree the matching.
Computer Science · Character sets
Flip the bits, count the codes
Seven bits can make 128 different patterns: every number from 0 to 127 is a different one. A character set matches each character to one pattern, so the number of patterns is the most characters it can code.
Predict, then check
In ASCII the letters and their sequences go in order. Now look closer at one letter in its two forms.
In ASCII, capital 'G' and lower case 'g' are different characters, so each has its own seven-bit sequence. Put the two sequences side by side. How many of the seven bits differ?
OCR GCSE Computer Science (J277): character sets, ASCII and Unicode are covered in specification section 1.2.4 Data storage.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
How a computer turns text into 0s and 1s, and why the length of the pattern decides how many characters it can handle.
What you need to know
- A character set matches each character to a unique binary sequence, so a computer can store and process text as binary.
- n bits give 2 to the power of n states, so each extra bit doubles the number of states.
Have a goA friend says each extra bit only adds one more state. Test it: one bit has two states, 0 and 1. List every state of two bits.
00, 01, 10 and 11: four states.
The second bit can be 0 or 1 after each of the one-bit states, so the number of states doubles rather than going up by one.
- A character set needs sequences long enough to give every character its own unique code.
- Computers must use the same character set, so one sequence means the same character on every device.
- Characters include upper and lower case letters (different characters), numbers, punctuation, spaces, and control characters such as enter and tab.
- ASCII uses a seven-bit sequence for each character, which gives 128 possible characters.
Have a goYour cousin swears she can fit 200 different characters into ASCII, one seven-bit sequence each. Bold claim. Can she?
No. Seven bits only give 128 states.
Every character needs its own unique sequence, and seven bits make only 2 to the power of 7 = 128 of them, so the codes run out long before 200.
- In ASCII, the letters and their sequences go in order.
- ASCII covers Western (basic English) alphabets only, so it has no code for Urdu letters or emojis.
- Unicode uses up to 32 bits (four bytes) per character, so it covers far more languages and symbols, emojis included.
- Unicode's first 128 characters match ASCII's, so a Unicode system displays ASCII text correctly.
Have a goMaya opens an old ASCII text file on a phone that uses Unicode. She is sure it will turn into missing characters. Is she right?
No. The text displays correctly.
Unicode's first 128 characters are the same as ASCII's, so the phone has a matching code for every character in the file.
The big picture
A character set matches each character to a unique binary sequence, so a computer can store and process text as binary. The length of the sequence decides how many characters can have their own code: each extra bit doubles the states. ASCII uses seven bits and covers Western alphabets only, while Unicode uses up to 32 bits, reaches far more languages, symbols and emojis, and begins with the same characters as ASCII.
Key points
Worked example
Problem
You are inventing a toy character set for a game. It has 20 characters, and each one needs its own unique binary sequence, all the same length. Should the sequences be 4 bits long or 7 bits long?
⚠ Watch out
Treating a capital letter and its lower case version as the same character. They are different characters with different sequences; in ASCII the two sequences differ in only one bit.
Memory hook
Add one bit and the codes double. That is why seven bits stop ASCII at 128 characters, and why Unicode, with far longer sequences, can keep going.
Check yourself
Without looking back: why do seven bits limit ASCII to 128 characters, and what does Unicode do about that limit?
Flashcards
(14)What is a character set?
How many states does a sequence of n bits have?
Why does a character set need a long enough binary sequence?
Why must computers use the same character set?
Which kinds of character does a character set have to represent?
Are 'a' and 'A' the same character?
What does ASCII stand for?
How do the letters sit in ASCII?
How do the ASCII sequences for a letter's two cases compare?
Why can't ASCII represent Urdu or emojis?
How many bits per character can Unicode use?
What does Unicode share with ASCII?
What does an ASCII-only system show for a character it has no code for?
Which came first, ASCII or Unicode?
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 OCR GCSE Computer Science topics
- ASCII
- Binary representation of characters
- Binary shifts
- Binary to hexadecimal conversion
- Bitmap images: pixels and binary
- Cache (primary storage context)
- Colour depth and resolution
- Data capacity calculations
- Denary to binary conversion (8-bit)
- Denary to hexadecimal conversion
- Image metadata
- Larger units: KB, MB, GB, TB, PB
How this lesson was checked. This OCR GCSE Computer Science (specification J277)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 13 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.