GCSE · Computer Science · AQA · Spec 8525
Character codes grouping/sequencing
Know just one code, 'A' = 65, and you can work out every capital letter's code in your head. Plus: why the character '7' doesn't have the code 7.
Computer Science · Character codes
Which run does each code belong to?
Your table only tells you three things: 'A' is 65, 'a' is 97 and '0' is 48. Pick a code, then put it in the group it belongs to. Before you place it, work out how far along the run it is, and keep an eye on where each run stops.
Still to sort
Capital letters (0)
The run starts at 'A' = 65
Where the line is: 26 capital letters, one code each, no gaps. But the last one isn't at 65 + 26. Hold that thought: you'll see why in a moment.
Lower case letters (0)
The run starts at 'a' = 97
Where the line is: A separate run of 26, with its own first code. 'a' and 'A' are different characters, so they have different codes.
Digit characters (0)
The run starts at '0' = 48
Where the line is: Just ten digit characters, '0' to '9'. '9' is 9 places after '0', and the run ends there.
None of these groups (0)
Not a capital, not lower case, not a digit
Where the line is: A code one below a run's first code, or one above its last, is outside that run. The ends are where counting goes wrong.
65, 97 and 48 are the real ASCII codes for 'A', 'a' and '0'. Every other code on this board was worked out from just those three.
Predict, then check
No full table, just one known code and some careful counting.
Your table says 'A' is 65. 'Z' is the 26th and last capital letter. What is the code for 'Z'?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Why one known code is enough to work out a whole alphabet of them, and why the character '7' doesn't have the code 7.
What you need to know
- What it means for character codes to be grouped and to run in sequence
- How to work out any code in a group from the group's first code
- Why the digit character '7' doesn't have the code 7
- How to use a given table to turn characters into codes, and codes back into characters
The big picture
Character codes are grouped: capital letters, lower case letters and digits each have their own group, and inside a group the codes run in sequence, going up by one. So a group's first code unlocks the rest: count the places after the first character and add them on. With 'A' = 65, 'Z' is 25 places along, so it's 90. Digits have their own run too: with '0' = 48, the character '7' is 55. Going from code to character, find the run, take away its first code and count on.
Key points
Worked example
Problem
A character table gives 'A' = 65, 'a' = 97 and '0' = 48. Write the character codes for the text Cab2.
⚠ Watch out
Adding the letter's position in the alphabet instead of the places after the first letter, which gives 'Z' as 65 + 26 = 91 instead of 65 + 25 = 90. 'A' is 0 places along its own run, so every letter is one place fewer than its position.
Memory hook
First code, then count on. 'A' is 0 steps from itself, so the 26th letter is only 25 steps away.
Check yourself
Using only 'A' = 65, 'a' = 97 and '0' = 48, write the codes for Wok4. Then decode your codes by counting on. Get Wok4 back? You've got it.
Flashcards
(7)What does it mean that character codes 'run in sequence'?
Which three groups of characters each have their own run of codes?
You know the code for 'A'. How do you find the code for any other capital letter?
If 'A' is 65, why isn't 'Z' 65 + 26?
Does the character '7' have the code 7?
Do 'A' and 'a' share a code?
How do you turn a code back into a character?
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 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.