Teachers' Portal  /  IGCSE Computer Science 0478  /  Data transmission  /  Parity checks, checksums and echo checks
Lesson pack · IGCSE Computer Science 0478 · 2.2 · IGCSE

Parity checks, checksums and echo checks

Did it arrive intact? Electrical interference can flip a bit, lose one or add one while data travels.

Student lesson Lab, full screen
At a glance

The shape of the lesson

Topic
Data transmission
Syllabus reference
Cambridge IGCSE Computer Science 0478, 2.2
Level
IGCSE
Duration
45 minutes, lab-led; stretches to a 60 minute block (see the contingency notes)
Position in topic
Lesson 4 of 6 in Data transmission; follows The universal serial bus (USB); leads into Check digits and automatic repeat query (ARQ)
Central model
Fig. 1: setting the parity bit for even parity
Cooperative structure
Assessment
Stage 1 check and the exam-style plenary from the student lesson, plus the worksheet as the exit task
Learning objectives

By the end of the lesson, learners can

Section by section
  • Parity bits: Sender and receiver first agree on even or odd parity.
  • The parity block: Send several bytes, each with its own parity bit, then add a parity byte that checks each column.
  • Checksums and echoes: Try the checksum and echo check modes in the lab.
Key points to leave on the board
  • Parity: count the 1s; the parity bit makes the total even (even parity) or odd (odd parity).
  • Parity block: odd row + odd column = the bit in error; flip it to correct it.
  • Checksum: calculated from the data, sent with it, recalculated by the receiver and compared.
  • Echo check: data sent back to the sender, who compares it with the original.
The core visual model

One picture every idea returns to

Interference during transmission can cause data loss, data gain or data change, so data must be checked when it arrives. A parity check adds a parity bit so that each byte has an even (even parity) or odd (odd parity) number of 1s; a parity block adds a parity byte too, so the exact bit in error can be found. A checksum is a value calculated from the data and sent with it, then recalculated by the receiver. In an echo check the receiver sends the data back and the sender compares it with the original.

even parity: the total number of 1s must be even 1110 1000 parity bit 7 data bits 1101000 contain three 1s 3 is odd, so the parity bit is set to 1 → four 1s in total if the receiver counts an odd number of 1s, an error has occurred
Fig. 1: setting the parity bit for even parity
Lesson sequence

Forty-five minutes, phase by phase

TimePhaseWhat happens in the roomGrouping
0 to 5 minHook: predictOpen with the question in the title, Did it arrive intact?. Electrical interference can flip a bit, lose one or add one while data travels. Put the figure on the board: it is the one picture every idea in the lesson returns to.Whole class, then pairs
5 to 13 minTeach and check: Parity bitsSender and receiver first agree on even or odd parity. Project tab 3 of the lab (Parity byte and parity block) and let a student drive it while the class predicts. Model the worked example Even parity on the board, one line at a time. Your turn: Using odd parity, what is the parity bit for the 7-bit data 1110000?Whole class, then pairs
13 to 21 minTeach and check: The parity blockSend several bytes, each with its own parity bit, then add a parity byte that checks each column. Model the worked example Find the error on the board, one line at a time.Pairs
21 to 30 minTeach and check: Checksums and echoesTry the checksum and echo check modes in the lab. Project tab 4 of the lab (Checksum and echo check) and let a student drive it while the class predicts. Model the worked example A simple checksum on the board, one line at a time.Connect-Extend-Challenge
30 to 36 minCheckThe four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong.Individual, then whole class
36 to 43 minPlenaryThe exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording.Individual, random call
43 to 45 minExit and homeworkSet the worksheet below (6 questions, 17 marks). Learners self-assess against the objectives before they leave.Individual
Timing and contingency

Protect the parts that carry the learning

The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.

Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.

Cut first if the build overruns: the last check in Checksums and echoes, never the check or the plenary.

In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.

Running the cooperative task

Connect-Extend-Challenge

After the new idea, each student writes three lines: how it connects to what they knew, how it extends their thinking, and what still challenges them. Pairs compare, then the challenges become the plenary.

The full structure, with its variations and the other twelve, is on the cooperative-learning page.

Examiner traps to pre-empt

What to head off, and how

Trap learners fall intoTeaching move that pre-empts it
A parity check cannot detect an error where two bits change (for example 01011001 becoming 01011111): the number of 1s stays even, so the error is missed.Return to Parity bits: ask a pair to state the correct version and show it on the lab before moving on.
A single parity bit only shows that a byte is wrong.Only a parity block (parity bits plus a parity byte) shows exactly which bit is wrong, so it can be corrected.
An echo check cannot tell where the error happened: the data may have been correct on arrival and changed on the way back.Either way, it has to be sent again.
Worksheet

Parity checks, checksums and echo checks: worksheet

6 questions, 17 marks. Written in the style of the papers; no past paper question is reproduced.

NameClassDate
Q1 · explain[2 marks]

Explain why data should be checked for errors after it has been transmitted.

Q2 · apply[2 marks]

The 7-bit values 1100101 and 1110000 are to be sent using even parity, with the parity bit as the leftmost bit. Write the two bytes that are sent.

Q3 · analysis[3 marks]

A system uses odd parity. These bytes are received: 10110110, 01001111, 01101001. Identify which byte contains an error and explain how you know. State one type of error a parity check would not detect.

Q4 · analysis[3 marks]

This parity block was sent using even parity. One bit was changed during transmission.

12345678
Byte 110110111
Byte 201101001
Byte 311010011
Parity byte00011101

Identify the bit in error and write the corrected byte.

Q5 · explain[4 marks]

Describe how a checksum is used to detect errors in transmitted data.

Q6 · explain[3 marks]

Describe how an echo check works, and give one disadvantage of it.

Answer key and marking notes
Q1 · 2 marks
  • Interference during transmission can affect the data.
  • Bits may be lost, gained or changed, so the data received may not match the data sent.
Q2 · 2 marks
  • 1100101 has four 1s (even), so the parity bit is 0: 01100101.
  • 1110000 has three 1s (odd), so the parity bit is 1: 11110000.
Q3 · 3 marks
  • 01101001 has an error.
  • It has four 1s, which is even, but odd parity was agreed (the other two bytes each have five 1s).
  • An error where two bits are changed (an even number of bits) would not be detected.
Q4 · 3 marks
  • Byte 3 has five 1s (odd), so the error is in byte 3; the other bytes have six and four 1s.
  • Column 4 has three 1s (odd); every other column is even.
  • The error is byte 3, bit 4: corrected byte 3 is 11000011.
Q5 · 4 marks
  • A value (checksum) is calculated from the data before it is sent, using an agreed algorithm.
  • The checksum is transmitted with the data.
  • The receiver recalculates the checksum from the received data using the same algorithm.
  • If the two values do not match, an error has occurred and the data is resent.
Q6 · 3 marks
  • The receiver sends a copy of the received data back to the sender.
  • The sender compares it with the original; if they are different an error has occurred and the data is resent.
  • Disadvantage: it is not known whether the error happened on the way there or on the way back / the data is sent twice, doubling the traffic.
Quiz

6 multiple-choice questions on this lesson

From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.

Q11 mark

Interference during transmission can cause errors in data. Which list gives the three types of error?

  • AData loss, data gain and data change
  • BData loss, data theft and data change
  • CData gain, data skew and data loss
  • DData change, data encryption and data gain
Q21 mark

The 7-bit data 1011110 is to be sent using even parity, with the parity bit added as the leftmost bit. Which byte is sent?

  • A11011110
  • B01011110
  • C11011111
  • D10111100
Q31 mark

A system uses odd parity. Which of these received bytes must contain an error?

  • A11000110
  • B10110110
  • C11100011
  • D00011100
Q41 mark

A checksum is calculated by adding the bytes and then subtracting 256 while the total is greater than 255. What is the checksum for the bytes 200, 150, 99 and 30?

  • A223
  • B479
  • C222
  • D255
Q51 mark

This parity block was sent using even parity. Bit 1 of each byte is the parity bit. One bit was changed during transmission.

Bit12345678
Byte 101010011
Byte 210111100
Byte 301100101
Byte 400001111
Parity byte10000001

Which bit is in error?

  • AByte 2, bit 6
  • BByte 2, bit 1
  • CByte 3, bit 6
  • DByte 6, bit 2
Q61 mark

In an echo check, the data returned to the sender does not match the original. Why is this method seen as less reliable than a checksum?

  • AThe error may have happened on the return journey instead
  • BThe receiver cannot compare the data because it does not keep a copy
  • CAn echo check can only detect errors when an even number of bits change
  • DThe echo check adds a parity byte that may itself be corrupted
Quiz key
Q1: A

Interference can cause bits to be lost (data loss), extra bits to appear (data gain) or bits to flip (data change). Data theft is a security issue, not a transmission error. Skew is a cause of errors in parallel transmission, not a type of error. Encryption is deliberate and protects data; it is not an error.

Q2: A

1011110 has five 1s, which is odd, so the parity bit must be 1 to make the total even: 1 followed by 1011110 gives 11011110 (six 1s). 01011110 uses parity bit 0, leaving five 1s, which is odd. 11011111 changes the last data bit, so the data itself is wrong. 10111100 shifts the data along instead of adding a parity bit in front of it.

Q3: A

11000110 has four 1s, an even number, so it breaks odd parity and must contain an error. 10110110 has five 1s, 11100011 has five 1s and 00011100 has three 1s: all odd, so each passes the odd parity check.

Q4: A

200 + 150 + 99 + 30 = 479. 479 is greater than 255, so subtract 256: 479 − 256 = 223. 479 is the total before the adjustment. 222 is an arithmetic slip of one. 255 is just the largest value a byte can hold, not the result of the algorithm.

Q5: A

Counting the 1s in each row: bytes 1, 3 and 4 each have four (even) but byte 2 has five (odd), so the error is in byte 2. Counting each column including the parity byte: every column is even except column 6, which has three 1s. The bit in error is where they cross: byte 2, bit 6, which should be 0. Bit 1 of byte 2 is its parity bit, and column 1 is even. Byte 3 has an even count. 'Byte 6, bit 2' swaps the row and column.

Q6: A

Because the data travels there and back, a mismatch does not show which journey the error happened on; the data may have reached the receiver correctly and been corrupted only on the return, so it is resent unnecessarily. In an echo check it is the sender that compares, so the receiver keeping a copy does not matter. The 'even number of bits' limitation belongs to a parity check, not an echo check. A parity byte is part of a parity block, not an echo check.

Lab and demo

What to project

The student lesson embeds these tabs. Open them full screen on the projector; every slider has a drag handle on the stage.

Slides

Slides for this lesson

A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.

Also for this topic

Everything else you can use

Original work by the TheLucidSTEM team. The worksheet items are written in the style of the papers; no past paper question is reproduced.
Previous lessonThe universal serial bus (USB)