📁 Topic 3 · 3.2 Units and Encoding
3.2b Representing text — ASCII and Unicode
Edexcel 4CP0 · iGCSE Computer Science · ~10 min read
Notes
──
Video
──
Slides
──
Worksheet
──
Quiz

Character Encoding

Text is represented in binary using a character encoding system — a standard that assigns a unique binary code to every character (letters, digits, punctuation, symbols). Each character has a unique code point (numeric value).

ASCII

ASCII (American Standard Code for Information Interchange) uses 7 bits to represent each character, giving 2⁷ = 128 possible characters (code points 0–127). An extended 8-bit version adds a further 128 characters (code points 128–255).

CharacterASCII Code (denary)Binary
'A'651000001
'B'661000010
'a'971100001
'0'480110000
' ' (space)320100000

Note: uppercase letters have smaller code values than lowercase. 'A'=65, 'Z'=90, 'a'=97, 'z'=122.

Limitations of ASCII

  • Only 128 characters — cannot represent accented characters (é, ü, ñ), non-Latin scripts (Arabic, Chinese, Hindi), emoji
  • Designed primarily for English-language computing
  • Insufficient for a globally connected world

Unicode

Unicode is a universal character encoding standard designed to represent every character in every language in the world. It includes over 1 million possible code points.

Common Unicode encoding formats:

  • UTF-8: Uses 1–4 bytes per character; backward-compatible with ASCII; most widely used on the web
  • UTF-16: Uses 2 or 4 bytes per character; common in operating systems
  • UTF-32: Uses 4 bytes for every character; simpler but uses more memory

ASCII vs Unicode

FeatureASCIIUnicode (UTF-8)
Bits per character7 (or 8 extended)8–32 (variable)
Number of characters128 (or 256)Over 1 million
Languages supportedEnglish primarilyAll world languages
File sizeSmaller (1 byte per char)Larger (variable bytes)
Backward compatible?Yes (first 128 = ASCII)
📝 Exam Tip: You may be asked to use an ASCII table to convert characters to binary and back. Remember: 'A'=65, 'a'=97. The difference between uppercase and lowercase is exactly 32 (or bit 5 being set). This is a useful pattern to know.
⚠️ Common Mistakes
  • Saying ASCII uses 8 bits — standard ASCII uses 7 bits (128 codes); 8-bit extended ASCII is a variant
  • Confusing the character '0' with the number 0 — the character '0' has ASCII code 48, not 0
  • Saying Unicode "replaces" ASCII — UTF-8 Unicode is backward-compatible with ASCII
← 3.2a Units of Data Topic 3 · 3.2 Units and Encoding Next: 3.2c Representing Images →
🔒
Pro Content
Subscribe to access all 47 Edexcel iGCSE lessons.
£7.99/month
or £59/year