SLIDE 1 / 9
CSZone.co.uk
OCR H446 · Component 1 · 1.4.1

Character Encoding:
ASCII and Unicode

OCR A Level Computer Science · cszone.co.uk
H446 SpecA Level
Learning Objectives

By the end of this topic you will be able to:

Explain what character encoding is and why it is needed
Describe ASCII — its structure, size, and limitations
Describe Unicode — its purpose, size, and encoding forms (UTF-8, UTF-16)
Compare ASCII and Unicode, including trade-offs
ASCII

ASCII — American Standard Code for Information Interchange

ASCII uses 7 bits to represent 128 characters (0–127): uppercase letters (A=65), lowercase letters (a=97), digits (0=48), punctuation, and control characters (e.g. newline=10, space=32).
Key ASCII Values
A = 65 (0100 0001)
Z = 90 (0101 1010)
a = 97 (0110 0001)
z = 122 (0111 1010)
0 = 48 (0011 0000)
Space = 32 (0010 0000)
Limitations
Only 128 characters — insufficient for:
• Non-English characters (é, ü, ñ)
• Languages using non-Latin scripts (Arabic, Chinese, Japanese, Cyrillic)
• Symbols (€, ©, ™)
• Emojis
Unicode

Unicode — Universal Character Encoding

Unicode assigns a unique code point (U+xxxx) to over 1.1 million characters covering all the world's writing systems, symbols, emojis, and more. It provides a single universal standard, eliminating character encoding conflicts between systems and languages.
UTF-8
Variable-length encoding: 1–4 bytes per character. ASCII characters use only 1 byte (backward compatible with ASCII). Most common on the web. Efficient for English/Latin text, less efficient for non-Latin scripts.
UTF-16
Variable-length: 2 or 4 bytes per character. Used internally by many operating systems (Windows, Java). More efficient for non-Latin characters than UTF-8 for those scripts.
Comparison

ASCII vs Unicode

FeatureASCIIUnicode (UTF-8)
Bits per character7 bits (stored as 8)8–32 bits (variable)
Number of characters1281,114,112+
Language supportEnglish onlyAll world languages
File size (English)SmallerSame (ASCII compatible)
File size (non-Latin)Cannot representLarger but necessary
CompatibilityUniversal legacyUTF-8 is ASCII-compatible
Exam Practice
OCR H446 Style · 4 marks
Explain why Unicode was developed to replace ASCII, and describe one advantage and one disadvantage of using Unicode instead of ASCII.
[4 marks]
1
ASCII only supports 128 characters (7-bit), which is only sufficient for English text and basic symbols. As computing became global, there was a need to represent all the world's writing systems in a single standard.
1
Unicode was developed to assign a unique code point to every character in all languages, symbols, emojis, and scripts, enabling software to work correctly across all languages without conflicts.
1
Advantage: Unicode (UTF-8) supports all world languages and over 1 million characters, enabling truly international software and correct text display across different systems.
1
Disadvantage: Unicode characters can require more storage (up to 4 bytes per character) compared to ASCII's 1 byte, increasing file sizes for non-Latin text and memory usage.
Common Mistakes

Don't Lose Marks

!
Saying ASCII uses 8 bits — standard ASCII uses 7 bits (128 characters, 0–127). Extended ASCII uses 8 bits (256 characters), but when the spec says "ASCII" it means the 7-bit standard. State 7 bits in your answer unless specifically asked about extended ASCII.
!
Saying Unicode always uses more storage — UTF-8 is variable-length and encodes ASCII characters in just 1 byte (it is backward compatible with ASCII). Only non-ASCII characters use 2–4 bytes. For English text, UTF-8 uses the same storage as ASCII.
!
Confusing Unicode and UTF-8 — Unicode is the standard that assigns code points; UTF-8 is one encoding that represents Unicode code points in bytes. UTF-16 is another. They are not the same thing, and OCR may test this distinction directly.
1.4.1d Complete
Well done! ✓
Character Encoding: ASCII and Unicode
Return to lesson to continue