🔤 Component 1 · 1.2 Data Representation
1.2.4e Character Encoding (ASCII & Unicode)
OCR J277 · GCSE Computer Science · ~11 min read
Notes
──
Video
──
Slides
──
Worksheet
──
Quiz

Character Encoding

A character encoding is a system that assigns a unique binary number (code point) to each character — letters, digits, punctuation and special symbols — so that computers can store and transmit text.

Every character you type is stored internally as a binary number. The encoding standard defines which number represents which character.

ASCII (American Standard Code for Information Interchange)

  • 7-bit ASCII: Uses 7 bits per character → 2⁷ = 128 characters (codes 0–127)
  • Extended ASCII: Uses 8 bits → 256 characters (codes 0–255)
  • Includes: uppercase letters (A–Z), lowercase letters (a–z), digits (0–9), punctuation, and control characters
  • ASCII is an American standard — it only covers English characters

Key ASCII Values to Know for OCR J277

CharacterDenaryBinary (7-bit)
'A'651000001
'B'661000010
'Z'901011010
'a'971100001
'z'1221111010
'0'480110000
'9'570111001
Space320100000

Pattern: 'A' = 65, so 'B' = 66, 'C' = 67 … 'Z' = 90. The lowercase equivalents are exactly 32 higher: 'a' = 97 = 65 + 32.

Limitations of ASCII

  • Only 128 (or 256 with extended ASCII) characters — not enough for global languages
  • Cannot represent Chinese, Arabic, Hindi, emoji, mathematical symbols, or most world scripts
  • The internet and globalisation require a universal encoding system

Unicode

Unicode is an international standard that assigns a unique code point to every character in every writing system in the world, including emoji and historic scripts.

  • UTF-8: Variable length (1–4 bytes per character). Most common on the web. Backwards compatible with ASCII.
  • UTF-16: Uses 2 or 4 bytes. Common in operating systems and programming environments.
  • UTF-32: Uses exactly 4 bytes. Fixed-length, simple but uses more memory.
  • Unicode can encode over 1.1 million possible characters (currently ~150,000 assigned)

ASCII vs Unicode Comparison

FeatureASCIIUnicode (UTF-8)
Bits per character7 (or 8 extended)8–32 (variable)
Character set size128 (or 256)Over 1.1 million possible
Languages supportedEnglish onlyAll world languages + emoji
File sizeSmallerLarger (for multi-byte characters)
CompatibilityWidely supportedBackwards compatible with ASCII

Why Unicode is Needed

Before Unicode, different countries used incompatible encoding systems. A file created in Japan might display as garbage on a Western computer. Unicode standardises encoding globally, so text can be shared across any computer, operating system, or language without corruption.

Exam tip: Key numbers to know: ASCII = 7 bits = 128 characters. A=65, a=97 (difference of 32). Unicode supports millions of characters. UTF-8 is backwards compatible with ASCII. OCR J277 commonly asks: "Why does Unicode use more bits than ASCII?" Answer: Unicode must represent a much larger set of characters from all world languages and symbols.
⚠️ Common Mistakes
  • Saying ASCII uses 8 bits — standard ASCII is 7 bits (128 characters). Extended ASCII is 8 bits.
  • Confusing the ASCII code for '0' (denary 48) with denary 0 — the character '0' ≠ the number 0
  • Saying Unicode and UTF-8 are the same thing — Unicode is the standard; UTF-8 is one encoding of it
  • Forgetting that Unicode is backwards compatible with ASCII for the first 128 characters
  • Saying Unicode uses more storage than ASCII always — UTF-8 uses 1 byte for ASCII characters, same as ASCII
✅ Notes completed!
Video coming soon

What's in this video

  • • What character encoding is and why it's needed
  • • ASCII: 7-bit, 128 characters, key code values (A=65, a=97)
  • • Limitations of ASCII: English only, can't represent global scripts
  • • Unicode: UTF-8/16/32, millions of characters, backwards compatible
Click slide or press arrow keys to navigate

Worksheet — 1.2.4e Character Encoding

8 questions · 20 marks

Q1What is character encoding? Why is it needed?[2]
✅ Mark scheme
Character encoding is a system that assigns a unique binary number (code point) to each character [1]; it is needed because computers can only store binary data, so text must be converted to numbers to be stored or transmitted [1].
Q2How many bits does standard ASCII use? How many characters can it represent?[2]
✅ Mark scheme
7 bits [1]; 2⁷ = 128 characters [1].
Q3The ASCII code for 'A' is 65. What is the ASCII code for 'D'? Explain how you worked it out.[2]
✅ Mark scheme
68 [1]; the letters A–Z are consecutive in ASCII, so D is the 4th letter: 65 + 3 = 68 [1].
Q4Why is 'a' (lowercase) different from 'A' (uppercase) in ASCII? What is the ASCII code for 'a'?[2]
✅ Mark scheme
ASCII assigns different code points to uppercase and lowercase letters — they are treated as distinct characters [1]; 'a' = 97 (= 65 + 32) [1].
Q5State two limitations of ASCII that led to the development of Unicode.[2]
✅ Mark scheme
Any 2 from: only supports English/Latin characters [1]; cannot represent characters from languages such as Chinese, Arabic, Japanese [1]; cannot represent emoji or mathematical symbols [1]; only 128 characters — far too few for global use [1].
Q6Compare ASCII and Unicode in terms of: (i) number of characters, (ii) bits per character, (iii) language support.[3]
✅ Mark scheme
(i) ASCII: 128 (7-bit) or 256 (8-bit); Unicode: over 1.1 million possible [1]
(ii) ASCII: 7 bits; Unicode/UTF-8: variable 8–32 bits [1]
(iii) ASCII: English only; Unicode: all world languages plus symbols and emoji [1].
Q7Explain why a file that uses Unicode encoding may have a larger file size than the same file in ASCII encoding.[2]
✅ Mark scheme
Unicode uses more bits per character (UTF-16 uses 2 bytes, UTF-32 uses 4 bytes) compared to ASCII's 7/8 bits [1]; therefore each character takes up more storage space, increasing file size [1]. Note: UTF-8 uses 1 byte for ASCII characters, so the difference only arises for non-ASCII characters.
Q8A string "Hi" is stored using 7-bit ASCII. (a) What are the ASCII denary values? (b) Convert each to binary. (c) How many bits are used in total?[5]
✅ Mark scheme
(a) 'H'=72, 'i'=105 [1]
(b) 72 = 1001000; 105 = 1101001 [1 each]
(c) 2 characters × 7 bits = 14 bits total [1]
Allow follow-through for correct binary from stated denary values.
?
out of 20 — self-mark above
Topic Quiz
Question 1 of 15
You scored
out of 15
Card 1 of 15
Click to reveal definition
🎉
Complete!
TermDefinition
🎯

Mini Test — 1.2.4e Character Encoding

10 questions · 10 marks · 10 minutes

← 1.2.4d Hexadecimal 1.2 Data Representation 1.2.4f Representing Images →
🔒
Unlock Everything
Subscribe to access all OCR J277 lessons.
£7.99/month
or £59/year
Subscribe now →