SLIDE 1
CSZone.co.uk
Click to advance · Arrow keys also work
Cambridge IGCSE 0478 · Topic 1 · 1.2a

Text
Representation

ASCII · Unicode · Character Sets · Character Codes

CSZoneCambridge IGCSE Computer Science 0478
ASCII

American Standard Code for Information Interchange

ASCII assigns a unique 7-bit binary number (0–127) to every character. Extended ASCII uses 8 bits (0–255) to include accented characters.
A = 65 = 01000001 a = 97 = 01100001
B = 66 = 01000010 b = 98 = 01100010
0 = 48 = 00110000 Space = 32 = 00100000
Uppercase A–Z: 65–90; Lowercase a–z: 97–122; Digits 0–9: 48–57
Lowercase = uppercase + 32 (a simple bit-flip in position 5)
Unicode

The Global Character Standard

Unicode was developed to represent characters from all the world's languages. The most common encoding, UTF-8, uses 1–4 bytes per character. Unicode is backwards-compatible with ASCII for the first 128 characters.
ASCII: 128 characters (7-bit), extended ASCII: 256 (8-bit) — not enough for all languages
Unicode: over 1 million possible code points — covers Chinese, Arabic, emoji, and more
Disadvantage of Unicode: uses more storage than ASCII for the same text
File Size Calculations

Working Out Storage Needed

ASCII text: 1 byte per character
UTF-16 Unicode: 2 bytes per character (for most common scripts)
Example: "Hello" (5 chars) = 5 bytes in ASCII = 10 bytes in UTF-16
A 500-word essay ≈ 2,500 characters ≈ 2,500 bytes ≈ 2.5 KB in ASCII
Exam Practice

Have a go at this question

Cambridge IGCSE 0478 style
State two differences between ASCII and Unicode.
4 marks
ASCII uses 7 bits per character [1] whereas Unicode uses up to 4 bytes [1]. ASCII can only represent 128 characters [1] whereas Unicode can represent over a million characters from many languages [1].
Key Takeaways

What to Remember

ASCII: 7-bit, 128 characters; A=65, a=97, 0=48
Unicode: global standard, up to 4 bytes per character, millions of code points
Unicode uses more storage than ASCII but supports many more languages and symbols
Text file size = number of characters × bytes per character