Character Sets

How computers represent text using ASCII and Unicode.

Think of it like: The Secret Agent Codebook

Imagine sending a secret message using numbers. You send "65", and your friend looks it up in their book to see "A".

A Character Set is just that agreed book. If you use one book (ASCII) and your friend uses another, the message will be garbled!

ASCII

American Standard Code for Information Interchange.

  • 7-bit code (128 characters).
  • Extended ASCII uses 8 bits (256 characters).
  • Limited to English language.
  • Small file size.

Unicode

Universal Character Set.

  • 16-bit or 32-bit (Millions of characters).
  • Covers ALL languages + Emojis 🚀.
  • Backwards compatible with ASCII.
  • Larger file size.

Calculating Text File Size

You must be able to calculate the data capacity required for an uncompressed text file.

File Size = Bits per character × Number of characters
Example: A 100-character message is encoded using standard 8-bit Extended ASCII. What is the file size in bits and bytes?

Bits: 8 bits × 100 characters = 800 bits.
Bytes: 800 bits / 8 = 100 Bytes. (Tip: Since 8 bits is exactly 1 Byte, 100 characters in ASCII is simply 100 Bytes!)

Text Decoder

Type to see how the computer stores your text in Memory.

Max 20 chars.

Char
Denary (ASCII)
Binary (8-bit)
Waiting for input...
Total Bits Needed 0
File Size (Bytes) 0 B

Secret Agent Training

Can you decode the enemy messages? Play ASCII Spy now.

Start Mission

Check Your Understanding

1. How many characters can standard 7-bit ASCII represent?

2. Why did computing globally transition towards using Unicode?

3. The letter 'A' is 65 in Decimal (01000001). What happens if you try to read it as an image pixel?

Evaluation Exam Scenario (AO3)

1 / 3

"Ahmet is writing a simple text-based program that only outputs numbers and the English alphabet. He decides to use a 32-bit Unicode character set to guarantee it is future-proof. Explain why this is an incredibly inefficient decision for this specific scenario." (3 marks)