Character Encoding: ASCII and Unicode
Master Character Encoding: ASCII and Unicode for GCSE Computer Science with this free worksheet and full mark scheme — Foundation and Higher exam-style questions with worked answers for AQA GCSE Computer Science (8525). Characters are stored as binary codes; ASCII covers basic characters and Unicode covers many more.
Free downloads
These worksheets and mark schemes are original, written for Virtus Academy and checked against the current AQA specification. Every worksheet comes with a full mark scheme.
Topic overview
Character encoding assigns a unique binary code to every character so text can be stored digitally.
ASCII uses 7 bits per character, giving 2⁷ = 128 possible characters. That covers the English alphabet in both cases, the digits, punctuation and control characters — but nothing else. Extended ASCII uses 8 bits for 256 characters.
Unicode was created because 128 characters cannot represent the world's writing systems. It uses more bits per character, allowing over a million, covering every major alphabet plus emoji. The trade-off is file size: Unicode text takes more storage than the equivalent ASCII. A useful detail is that character codes run in sequence, so 'B' is always one more than 'A'.
Revision notes
ASCII
7 bits per character, giving 2⁷ = 128 possible characters.
Covers the English alphabet in upper and lower case, digits, punctuation and control characters. Extended ASCII uses 8 bits for 256 characters.
Unicode
Uses more bits per character, allowing over a million different characters.
This covers every major writing system plus symbols and emoji. The cost is storage: Unicode text takes more space than the equivalent ASCII text.
Sequential codes
Character codes run in sequence within each group.
If 'A' is 65 then 'B' is 66 and 'Z' is 90. Lower case letters form their own sequence starting at 97. This lets a program convert case or check alphabetical order by arithmetic on the codes.
Key points
- Character encoding maps characters to binary codes.
- ASCII uses 7 bits per character.
- ASCII gives 128 possible characters.
- Unicode allows over a million characters.
- Unicode covers every major writing system.
- Character codes run in sequence.
Worked examples
Example 1
Calculate how many characters can be represented using 7-bit ASCII. [2 marks]
Working
Example 2
If the character 'A' has code 65, state the code for 'D' and explain. [2 marks]
Working
Example 3
Explain one advantage and one disadvantage of Unicode compared with ASCII. [2 marks]
Working
Common mistakes
Saying ASCII uses 8 bits.
Standard ASCII uses 7; extended ASCII uses 8.
Forgetting that upper and lower case have different codes.
They form separate sequences.
Saying Unicode is always better.
It uses more storage, which matters for large text files.
Calculating 7 × 2 instead of 2⁷.
The number of combinations is 2 to the power of the bit count.
Exam tips
- Use 2 to the power of the bit count for combinations.
- Remember codes run in sequence within each group.
- Give both an advantage and disadvantage for Unicode.
- Note that case affects the code.
Key terms
- Character encoding
- Mapping characters to binary codes.
- ASCII
- A 7-bit encoding with 128 characters.
- Unicode
- An encoding supporting over a million characters.
- Character set
- The complete collection of characters an encoding supports.
Related topics
Written and reviewed against the current AQA specification. Spotted an error? Let us know.