← IGCSE Computer Science Paper 1

Even parity

A parity bit is added so the total number of 1s in the byte, including the parity bit, is even. Odd count of 1s in the data gives parity bit 1; even count (even 0) gives 0.

Understanding Even parity in IGCSE Computer Science Paper 1

What it does: Zero 1s is an even count, so no 1 is needed. The parity bit stays 0 and the whole byte keeps an even number of 1s. 1011000 has three 1s, which is odd. The parity bit is 1 to make the total four, which is even.

Common mistakes: Parity depends on the number of 1s in the data, so the code must count "1", not "0". The line should be ones = data.count("1"). The bits must be stored as a string in quotes so that .count("1") works on them. Without quotes it is a number and the program fails. It should be bits = "1100110".

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 155–164) and word search (Modules 142–164).

Take this worksheet further — free with Cloodit

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

Learning
Duo
A system uses even parity. The 7 data bits are 1011000. What should the parity bit be?
10
Matches
1100110 + parity bit 1 -> 11001101
↓
The data 1100110 already has four 1s (even), so the parity bit should be 0. Adding 1 makes five 1s, which is odd.
Applying
Meanings
Term
even parity
Meaning
A parity bit is added so the total number of 1s in the byte, including the parity bit, is even. Odd count of 1s in the data gives parity bit 1; even count (even 0) gives 0.
Practice
count ← number of 1s in data
Testing
Gaps
parity bit =
Check Answer
Spots
1data = "1011001"
2ones = data.count("0")

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

The 'Penguin' badge — List Waddler, 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. A system uses even parity. The 7 data bits are 1011000. What should the parity bit be?
A. 0
B. 1 ✓
1011000 has three 1s, which is odd. The parity bit is 1 to make the total four, which is even.
2. A system uses even parity. The 7 data bits are 0110011. What should the parity bit be?
A. 0 ✓
B. 1
0110011 has four 1s, which is already even. The parity bit is 0 so the total stays even.
3. A system uses even parity. The 7 data bits are 0000000. What should the parity bit be?
A. 0, because zero 1s is an even count ✓
B. 1, because there are no 1s so one must be added
0 is an even number, so no 1s is already an even count. The parity bit is 0.
4. Which statement describes even parity?
A. The total number of 1s, including the parity bit, is even ✓
B. The total number of 1s, including the parity bit, is odd
Even parity makes the number of 1s in the whole byte even. Odd parity makes it odd.
5. With even parity, the data bits contain an odd number of 1s. What is the parity bit?
A. 0
B. 1 ✓
Adding a 1 to an odd count gives an even count, so the parity bit is 1.

Match the Pairs

1011001 + parity bit 0 -> 10110010 → The data 1011001 has four 1s, which is already even, so the even parity bit is 0
0110100 + parity bit 1 -> 01101001 → The data 0110100 has three 1s, which is odd, so the even parity bit is 1 to make the total four
Data with no 1s at all still has an even count of 1s, because 0 is even, so the even parity bit is 0 → 0000000 + parity bit 0 -> 00000000
With even parity, an odd number of 1s in the data means the parity bit is set to 1 to make the total even → 1110000 + parity bit 1 -> 11100001
1100110 + parity bit 1 -> 11001101 → The data 1100110 already has four 1s (even), so the parity bit should be 0. Adding 1 makes five 1s, which is odd.
1000001 + parity bit 0 -> 10000010 → The data 1000001 has two 1s, which is even, so parity bit 0 is right. The error is in a different case: the learner counted 0s instead of 1s.

Key Term

even parity
A parity bit is added so the total number of 1s in the byte, including the parity bit, is even. Odd count of 1s in the data gives parity bit 1; even count (even 0) gives 0.

Fill in the Blanks

1. data = 1011001 ones = 4 (even) parity bit = 0
Hint: The data already has an even number of 1s. Type the parity bit that keeps the total even.
2. data = 0110100 ones = 3 (odd) parity bit = 1
Hint: The data has an odd number of 1s. Type the parity bit that makes the total even.
3. data = 0000000 ones = 0, which is an even count parity bit = 0
Hint: Zero counts as an even number. Type the parity bit needed.
4. Even parity makes the number of 1s even
Hint: Type the word that describes the total count of 1s in the byte with even parity.
5. data = 1101110 ones = 5 parity bit = 1
Hint: Count the 1s in the data and type that number.

Spot the Error

Question 1
A data = "1011001"
B ones = data.count("0")
C if ones % 2 == 0:
D parity = 0
E else:
F parity = 1
Line B — Parity depends on the number of 1s in the data, so the code must count "1", not "0". The line should be ones = data.count("1").
Question 2
A bits = 1100110
B ones = bits.count("1")
C parity = ones % 2
D print(bits + str(parity))
Line A — The bits must be stored as a string in quotes so that .count("1") works on them. Without quotes it is a number and the program fails. It should be bits = "1100110".
Question 3
A ones ← 4
B IF ones MOD 2 = 0 THEN
C parity ← 1
D ELSE
E parity ← 1
F ENDIF
Line C — Four 1s is an even count, and the data already has an even number of 1s. With even parity the parity bit must therefore be 0, not 1. The line should be parity ← 0.
Question 4
A def even_parity(bits):
B ones = bits.count("1")
C return ones // 2
D print(even_parity("1011000"))
Line C — The parity bit is the remainder after dividing the number of 1s by 2, which is 0 for an even count and 1 for an odd count. // gives the whole-number quotient instead. It should be return ones % 2.
Question 5
A data = "0000000"
B ones = data.count("1")
C parity = 1
D print(parity)
Line C — Zero 1s is an even count, because 0 is even. The data already has an even number of 1s, so the even parity bit is 0. The line should be parity = ones % 2, which gives 0.

Student with a class code? Join your class →