GCSE · Computer Science · AQA · Spec 8525
7-bit ASCII
Press A and your computer doesn't save a picture of an A. It saves a number, 65, and every computer using the same table reads it back as A.
Character encoding · 7-bit ASCII
Seven switches, one character
Each box is one bit, and the number above it is its place value. The code is just the sum of the place values that are switched on. Right now the bits read 1000001: that's 64 + 1 = 65, and in the ASCII table code 65 is capital A.
Character encoding · Using a table
Characters to codes, and codes back to characters
On the left is part of the ASCII table. First we encode the word Hi5 into 7-bit codes. Then we decode three 7-bit codes back into a word.
Before you press Next, say the answer for the highlighted row out loud. Then check yourself.
1 Character Code2 5 533 A 654 H 725 g 1036 i 1057 o 111
| Task | Character | Code | 7 bits |
|---|---|---|---|
| encode | H | 72 | 1001000 |
Output
H → 1001000
Step 1: Encoding Hi5. Find capital H in the table: 72. Build 72 from the place values: 64 + 8, so the bits are 1001000.
Step with Next. Commit to each answer before it appears.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Every character you type is secretly a number. Here's which number, and why seven bits are enough.
What you need to know
- A character set is an agreed list of characters, and every character in it gets its own unique code.
- Computers store and send the code, not a picture of the letter. The shape is drawn when the text is displayed.
Have a goYour friend switches their phone to the curliest, most ridiculous font they can find. Does the code stored for the letter H change?
No. The code stays exactly the same.
Only the code is stored; the shape is drawn at display time, so a new font changes how H looks, never which number stands for it.
- 7-bit ASCII stores each character's code in 7 bits, with place values 64, 32, 16, 8, 4, 2 and 1.
- So the codes run from 0 (0000000) to 127 (1111111). Zero counts too, which makes 128 different characters.
- Encoding means going from character to code: look the character up in the given table, then write its code in 7 bits.
- Decoding goes the other way: add the place values of the 1s, then find that code in the table.
Have a goPart of a table says M = 77 and m = 109. Decode 1001101.
M (64 + 8 + 4 + 1 = 77).
The 1s sit on 64, 8, 4 and 1, which makes 77. Lower-case m (109) would also need the 32 bit switched on.
- Always write all 7 bits. A small code gets 0s at the front, so 33 is 0100001.
- Capitals, lower case and digits are all different characters, so H, h and the digit 5 each have their own code.
- Codes run in order within a group: A is 65, B is 66, and so on. Lower-case letters and digits work the same way.
Have a goThe digit 0 has the code 48. Without a table, what is the code for the digit 7?
55.
Digits run in order, so count on 7 from 48. It isn't 7: the character 7 is stored as its code, not as the number itself.
- Unicode uses the same codes as ASCII up to 127.
The big picture
A character set is an agreed table that gives every character its own code. 7-bit ASCII stores each code in 7 bits, so the codes run from 0 to 127: 128 characters in total. With a given table you can turn characters into codes and codes back into characters, and Unicode uses the same codes as ASCII up to 127.
Key points
Worked example
Problem
Part of an ASCII table gives T = 84, a = 97 and e = 101. Use it to encode the word Tea as 7-bit binary codes.
⚠ Watch out
Saying 7-bit ASCII has 127 characters because the biggest code is 127. Looks convincing. It isn't: code 0 (0000000) is a code too, so there are 128 codes, from 0 to 127.
Memory hook
Seven switches, 128 codes: 0 to 127. One agreed table, so 65 is A on every machine.
Check yourself
Cover the page. What is a character set? Why are there 128 codes when the biggest is 127? If A is 65, which character is 1001001? And what is ASCII code 72 in Unicode?
Flashcards
(12)What is a character set?
What does the "7-bit" in 7-bit ASCII mean?
What is the largest code in 7-bit ASCII?
How many different characters can 7-bit ASCII represent?
When you type a letter, what does the computer actually store?
Character set or font: which one decides a character's code?
How do you turn a character into its code?
How do you turn a 7-bit code into a character?
Why is 53 written as 0110101 and not 110101 in ASCII?
Do H and h have the same code?
If you know the code for one capital letter, how can you find another?
What does Unicode have in common with ASCII?
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 AQA GCSE Computer Science topics
How this lesson was checked. This AQA GCSE Computer Science (specification 8525)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 30 October 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.