← IGCSE Computer Science Paper 1

Character set

The agreed list of characters a system can use, with a unique binary code for each one, so every device reads the same code as the same character.

Understanding Character set in IGCSE Computer Science Paper 1

What it does: Adding a bit doubles the number of unique codes, so a set with more characters needs codes with more bits. A letter, a digit, a punctuation mark and a symbol are all characters in the set, and each has a different binary code. A character set gives every character a unique code. If two characters shared a code, the computer could not tell them apart. A character set covers more than letters. It includes digits like 7, punctuation like ! and symbols like £ or #. Character sets are agreed in advance, so any device that uses the same set reads a code as the same character.

Common mistakes: The number of codes n bits can store is 2 to the power n, so the line must be size = 2 ** bits. With 7 bits that gives 128 codes, but 2 * bits would give only 14. ord() turns a character into its number code. chr() does the opposite and turns a number into a character. The line should be code = ord(letter).

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 28–41) and word search (Modules 28–58).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
What is a character set?
An agreed list of characters, each with its own unique binary codeA list of characters that all share the same binary code
Matches
Phone A uses one character set and Phone B uses a different one. A text sent as 01000001 is always shown as 'A' on both phones.
↓
Devices must share the same character set. If the sets differ, the same binary code can be shown as a different character, so the message is garbled.
Applying
Meanings
Term
character set
Meaning
The agreed list of characters a system can use, with a unique binary code for each one, so every device reads the same code as the same character.
Practice
// Character set: a unique code for each
Testing
Gaps
code = ("A")
Check Answer
Spots
1bits = 7
2size = 2 * bits

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Arctic Fox' badge — Tundra Tracker, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What is a character set?
A. An agreed list of characters, each with its own unique binary code ✓
B. A list of characters that all share the same binary code
A character set gives every character a unique code. If two characters shared a code, the computer could not tell them apart.
2. Why must two devices use the same character set to share a text message?
A. So the message uses fewer bits when it is sent
B. So the codes sent are read as the same characters ✓
If the sender and receiver use different sets, the same binary code could be shown as a different character, so the text would look wrong.
3. Which of these can be stored in a character set?
A. Only the letters A to Z
B. Letters, digits, punctuation and symbols ✓
A character set covers more than letters. It includes digits like 7, punctuation like ! and symbols like £ or #.
4. The digit 5 typed as text is stored as...
A. A character with its own code in the set ✓
B. No code, because it is a number
When typed as text, the digit 5 is a character. It has its own code, which is different from the binary number 5.
5. A character set needs to add thousands more characters. What happens to the length of the codes?
A. Longer codes are needed, so more bits per character ✓
B. The codes can stay the same length
n bits give 2^n unique codes. A bigger set needs more unique codes, so each code needs more bits.

Match the Pairs

character set → The agreed list of characters a system can use, each with its own unique binary code
01000001 = 'A' → One entry in a character set: a unique binary code that every device reads as the same character
A bigger character set needs longer codes, because more bits are needed to give each character a unique code → 7 bits = 128 codes, 8 bits = 256 codes
A character set covers letters, digits, punctuation and symbols, and each one gets its own code → 'a' = 01100001, '7' = 00110111, '!' = 00100001, '#' = 00100011
Phone A uses one character set and Phone B uses a different one. A text sent as 01000001 is always shown as 'A' on both phones. → Devices must share the same character set. If the sets differ, the same binary code can be shown as a different character, so the message is garbled.
A character set with 300 characters can give every character a unique code using only 8 bits. → 8 bits give only 256 different codes, which is fewer than 300. The set needs longer codes, such as 9 bits or more.

Key Term

character set
The agreed list of characters a system can use, with a unique binary code for each one, so every device reads the same code as the same character.

Fill in the Blanks

1. code = ord("A") print(code)
Hint: Type the built-in function that returns the number code for a character.
2. print(chr(65))
Hint: Type the built-in function that turns a number code back into its character.
3. print(bin(ord("A")))
Hint: Type the built-in function that shows a number as binary.
4. bits = 8 characters = 2 ** bits print(characters)
Hint: Type the variable that holds the code length, since more bits per code means a bigger set.
5. print(chr(65) == "A")
Hint: Type the operator that checks whether two values are equal, showing both sides read the same code as the same character.

Spot the Error

Question 1
A bits = 7
B size = 2 * bits
C print(size)
Line B — The number of codes n bits can store is 2 to the power n, so the line must be size = 2 ** bits. With 7 bits that gives 128 codes, but 2 * bits would give only 14.
Question 2
A letter = 'A'
B code = chr(letter)
C print(code)
Line B — ord() turns a character into its number code. chr() does the opposite and turns a number into a character. The line should be code = ord(letter).
Question 3
A code = ord('A')
B next_code = code + 1
C print(ord(next_code))
Line C — next_code is already a number, so ord() cannot be used on it. To show the character that has that code, use chr(next_code), which prints B.
Question 4
A bits = '8'
B chars = 2 ** bits
C print(chars)
Line A — The number of bits must be a number, not a string. With bits = '8', the calculation 2 ** bits causes an error. It should be bits = 8.
Question 5
A char = A
B code = ord(char)
C print(code)
Line A — A character must be written inside quotes. Without quotes Python treats A as a variable name that does not exist. It should be char = 'A'.

Student with a class code? Join your class →