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

64 + 1 = 65

7-bit binary 1000001 = 65 in denary

ASCII code (denary)65
Tap a bit to flip it. Make 66, the code for B. Then switch all seven on: how big can a 7-bit code get?

Each box is one bit, and the number above it is its place value. The code is 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 sets

So what is a character set?

You type "Hi" on your laptop and send it. Your friend opens it on a phone made by a completely different company, and it still says "Hi".

What makes that work? Pick the idea closest to what you think right now.
How sure are you?

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 Code
2 5 53
3 A 65
4 H 72
5 g 103
6 i 105
7 o 111
TaskCharacterCode7 bits
encodeH721001000

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.

1 / 6

Step with Next. Commit to each answer before it appears.

Step 1 of 6: Encoding Hi5. Find capital H in the table: 72. Build 72 from the place values: 64 + 8, so the bits are 1001000..

Exam line: Encoding: character → find its code in the table → write the code in 7 bits. Decoding: 7 bits → add up the place values → find that code in the table.
Watch out: Capital and lower-case letters are different characters with different codes, so copy the case exactly. And digits are characters too: the character 5 has its own code, 53.

Character encoding · Check the method

Where does this answer go wrong?

Use this part of the ASCII table (C = 67, a = 97, b = 98) to decode the 7-bit codes 1000011 1100001 1100010.

A student's answer — which line goes wrong?

ASCII and Unicode

7-bit ASCIIvsUnicode
Focus

Codes 0 to 127

7-bit ASCII

All of ASCII's codes

Unicode

The same characters with the same codes

The insight

For codes 0 to 127, the two tables match exactly.

Code for A

7-bit ASCII

65

Unicode

65

Decoding 1000010

7-bit ASCII

66, which is B

Unicode

66, which is B

Codes above 127

7-bit ASCII

None: ASCII ends at 127

Unicode

Carries on past 127

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 in which every character has its own unique code.
  • 7-bit ASCII stores each character's code in 7 bits, so the codes run from 0 (0000000) to 127 (1111111): 128 different characters.
  • To convert a character to its code, look the character up in the given table. To convert a code to a character, look the code up.
  • Codes run in order within a group: in ASCII A is 65, B is 66 and so on, so you can work out other capital letters once you know A. The same goes for lower-case letters and for digits.
  • 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

1Text is stored as numbers (character codes), not as pictures of letters.
2Seven bits have place values 64, 32, 16, 8, 4, 2 and 1, biggest on the left.
3Always write an ASCII code with all 7 bits: 53 is 0110101, not 110101.
4Capital and lower-case letters are different characters, so they have different codes.
5Digits are characters too: the character 5 is stored as its code, 53, not as the number 5.
6A code from 0 to 127 means the same character in ASCII and in Unicode.

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. 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?
An agreed list of characters in which every character has its own unique code.
What does the "7-bit" in 7-bit ASCII mean?
Each character's code is stored using 7 bits.
What is the largest code in 7-bit ASCII?
127, which is 1111111 in binary.
How many different characters can 7-bit ASCII represent?
128, because the codes run from 0 to 127.
When you type a letter, what does the computer actually store?
The letter's character code: a number. The shape is drawn later, when the text is displayed.
Character set or font: which one decides a character's code?
The character set. A font only decides how the character looks.
How do you turn a character into its code?
Find the character in the given encoding table and read off its code.
How do you turn a 7-bit code into a character?
Add the place values of the 1s (64, 32, 16, 8, 4, 2, 1) to get the code, then find that code in the table.
Why is 53 written as 0110101 and not 110101 in ASCII?
ASCII codes are always 7 bits long, so a smaller code is padded with 0s at the front.
Do H and h have the same code?
No. Capital and lower-case letters are different characters, so each has its own code.
If you know the code for one capital letter, how can you find another?
Count on: capital letters have codes that run in order, one after another.
What does Unicode have in common with ASCII?
Unicode uses the same codes as ASCII up to 127.

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 AQA GCSE Computer Science topics

See the full AQA Computer Science curriculum →

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 29 September 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.