📁 Paper 2 · 3.3 Data Representation
3.3.5 Character Encoding (ASCII & Unicode)
AQA 8525 · GCSE Computer Science · ~10 min read
Notes
──
Video
──
Worksheet
──
Quiz

Why Computers Need Character Encoding

Computers only store binary numbers. To represent text (letters, digits, punctuation), a character encoding is needed — a standard that maps each character to a unique number.

ASCII

ASCII (American Standard Code for Information Interchange) is a 7-bit encoding representing 128 characters (0–127). Most systems use 8-bit extended ASCII, giving 256 characters.

RangeWhat it representsExample
0–31Control characters (non-printable)13 = carriage return, 10 = newline
48–57Digit characters '0'–'9''0' = 48, '9' = 57
65–90Uppercase letters A–Z'A' = 65, 'Z' = 90
97–122Lowercase letters a–z'a' = 97, 'z' = 122

Key pattern to remember

Uppercase A = 65. Lowercase a = 97. The gap between uppercase and lowercase is always 32 ('a' – 'A' = 32). Each subsequent letter adds 1: 'B' = 66, 'C' = 67, etc.

Limitations of ASCII

ASCII was designed for English text only. It cannot represent accented characters (é, ñ), non-Latin scripts (Chinese, Arabic, Hindi), or modern symbols like emoji. As computing became global, a more comprehensive system was needed.

Unicode

Unicode is an international standard that assigns a unique code point to every character in every writing system in the world. Unicode currently covers over 140,000 characters, including emoji.

EncodingBits per characterCharacters supportedCommon use
ASCII7 (or 8)128 (or 256)English text
UTF-88–32 (variable)1,114,112Web pages, email, most modern systems
UTF-1616 or 321,114,112Windows internals, Java
UTF-3232 (fixed)1,114,112Systems needing fixed-width characters

Unicode and ASCII compatibility

The first 128 Unicode code points are identical to ASCII — the letter 'A' is code point 65 in both. This means ASCII text is valid UTF-8, ensuring backward compatibility.

Why Unicode uses more storage

Because Unicode needs to represent far more characters than ASCII, each character may require more bits. Where ASCII uses 7 bits per character, UTF-16 uses 16 bits minimum. A document in UTF-16 will use roughly twice as much storage as the same document in ASCII.

Calculating File Size from Text

File size in bits = number of characters × bits per character.

-- Text file: "Hello" (5 characters) using 8-bit ASCII 5 characters × 8 bits = 40 bits = 5 bytes -- Same text in UTF-16 (16 bits per character) 5 characters × 16 bits = 80 bits = 10 bytes
Exam tip: Know that ASCII = 7-bit (128 characters) and Unicode supports all world languages. A common exam question asks why Unicode uses more storage — the answer is that more bits per character are needed to represent a larger character set.
⚠️ Common Mistakes
  • Confusing ASCII value of digit '5' (= 53) with the number 5. The ASCII code for digit characters is NOT the same as the digit's numeric value.
  • Saying ASCII is 8-bit — technically ASCII is 7-bit (128 chars); 8-bit is extended ASCII.
  • Thinking Unicode replaces ASCII codes — it extends them; the first 128 codes are the same.
Video coming soon

Key points

  • ASCII: 7-bit, 128 characters — English letters, digits, punctuation, control codes
  • ASCII 'A'=65, 'a'=97; gap of 32 between upper and lowercase
  • Unicode: millions of characters, covers all world scripts and emoji
  • UTF-8 is variable-width (1–4 bytes); first 128 code points match ASCII
  • More bits per character = larger character set but more storage needed
Click slide or press arrow keys to navigate
✍️

Worksheet — 3.3.5 Character Encoding

8 questions · 17 marks

Q1How many bits does standard ASCII use to represent each character, and how many characters can it represent?[2]
✅ Mark scheme
Mark scheme
7 bits [1]; 128 characters [1].
Q2The ASCII code for 'A' is 65. What are the ASCII codes for 'D' and 'a'?[2]
✅ Mark scheme
Mark scheme
'D' = 68 [1]; 'a' = 97 [1].
Q3Give two limitations of ASCII that led to the development of Unicode.[2]
✅ Mark scheme
Mark scheme
Any two: cannot represent non-English characters / languages [1]; cannot represent accented characters (e.g. é) [1]; cannot represent emoji / special symbols [1]; only 128 characters — too few for global use [1].
Q4Define 'character encoding'.[2]
✅ Mark scheme
Mark scheme
A standard/system [1] that maps each character (letter, digit, symbol) to a unique binary number/code point [1].
Q5A text file contains the word "CAT" stored using 8-bit ASCII. Calculate the file size in bits and bytes.[2]
✅ Mark scheme
Mark scheme
3 characters × 8 bits = 24 bits [1]; 24 ÷ 8 = 3 bytes [1].
Q6Explain why a file stored using UTF-16 would be larger than the same file stored in ASCII.[2]
✅ Mark scheme
Mark scheme
UTF-16 uses 16 bits per character [1]; ASCII uses only 7 (or 8) bits per character, so UTF-16 requires more bits to store each character, resulting in a larger file [1].
Q7How many characters can Unicode represent, and give one advantage this has over ASCII?[2]
✅ Mark scheme
Mark scheme
Over 1 million (1,114,112) characters [1]; advantage: supports all world languages / scripts, emoji, and special symbols [1].
Q8A file stores 200 characters using UTF-16 (16 bits per character). Calculate the file size in bytes and kilobytes.[3]
✅ Mark scheme
Mark scheme
200 × 16 = 3200 bits [1]; 3200 ÷ 8 = 400 bytes [1]; 400 ÷ 1024 ≈ 0.39 KB [1].
Check your answers above.
Topic Quiz
Q 1 of 10
You scored
out of 10
Card 1 of 5
Click to flip
🎉
All done!
TermDefinition
🎯

Mini Test — 3.3.5 Character Encoding

Timed exam conditions.

  • 8 questions · 10 minutes
  • 5 MCQ + 3 short answer
← 3.3.4 Binary Arithmetic
28 of 57 · AQA 8525
3.3.6 Representing Images →