ASCII · Unicode · Character Codes · Character Sets
CSZoneAQA GCSE Computer Science 8525
Why Encode Characters?
Computers Can Only Store Numbers
Computers store everything as binary numbers. Character encoding is a standard that assigns a unique number to each character, so the computer knows how to convert between characters and binary values.
Character 'A' → ASCII code 65 → Binary 01000001 Character 'a' → ASCII code 97 → Binary 01100001 Character '0' → ASCII code 48 → Binary 00110000
Key pattern:'A'=65, 'B'=66 … 'a'=97, 'b'=98. A lowercase letter is always 32 more than its uppercase.
ASCII
American Standard Code for Information Interchange
Character
ASCII (Denary)
Binary
'A'
65
01000001
'Z'
90
01011010
'a'
97
01100001
'0'
48
00110000
Space
32
00100000
ASCII uses 7 bits→ 2⁷ = 128 characters. Includes letters, numbers, punctuation, and control characters.
Unicode
A Global Standard
PROBLEM WITH ASCII
ASCII only covers 128 characters — not enough for Chinese, Arabic, emoji, or special symbols.
UNICODE SOLUTION
Unicode supports over 1 million characters covering virtually all languages and symbols, including emoji (😊).
ASCII characters have the same code values in Unicode — backwards compatible
Unicode uses more bits per character (e.g. UTF-8, UTF-16, UTF-32) — takes more storage
Exam Practice
Have a go at this question
AQA-style question
(a) The ASCII code for 'M' is 77. What is the ASCII code for 'm'? (b) Give one reason why Unicode was developed to replace ASCII.
3 marks
(a) 77 + 32 = 109 [1] (b) ASCII only supports 128 characters [1] so it cannot represent characters from non-Latin languages (e.g. Chinese, Arabic) or symbols like emoji [1].
Key Takeaways
What to Remember
Character encoding maps characters to unique binary numbers