The shape of the lesson
By the end of the lesson, learners can
- 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.
- 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.
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.
Forty-five minutes, phase by phase
| Time | Phase | What happens in the room | Grouping |
|---|---|---|---|
| 0 to 5 min | Hook: predict | Open 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 min | Teach and check: Parity bits | Sender 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 min | Teach and check: The parity block | Send 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 min | Teach and check: Checksums and echoes | Try 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 min | Check | The 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 min | Plenary | The 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 min | Exit and homework | Set the worksheet below (6 questions, 17 marks). Learners self-assess against the objectives before they leave. | Individual |
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.
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.
What to head off, and how
| Trap learners fall into | Teaching 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. |
Parity checks, checksums and echo checks: worksheet
6 questions, 17 marks. Written in the style of the papers; no past paper question is reproduced.
Explain why data should be checked for errors after it has been transmitted.
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.
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.
This parity block was sent using even parity. One bit was changed during transmission.
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | |
|---|---|---|---|---|---|---|---|---|
| Byte 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 |
| Byte 2 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 |
| Byte 3 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 1 |
| Parity byte | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 |
Identify the bit in error and write the corrected byte.
Describe how a checksum is used to detect errors in transmitted data.
Describe how an echo check works, and give one disadvantage of it.
Answer key and marking notes
- Interference during transmission can affect the data.
- Bits may be lost, gained or changed, so the data received may not match the data sent.
- 1100101 has four 1s (even), so the parity bit is 0: 01100101.
- 1110000 has three 1s (odd), so the parity bit is 1: 11110000.
- 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.
- 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.
- 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.
- 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.
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.
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
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?
- A
11011110 - B
01011110 - C
11011111 - D
10111100
A system uses odd parity. Which of these received bytes must contain an error?
- A
11000110 - B
10110110 - C
11100011 - D
00011100
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
This parity block was sent using even parity. Bit 1 of each byte is the parity bit. One bit was changed during transmission.
| Bit | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| Byte 1 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 1 |
| Byte 2 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 0 |
| Byte 3 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 |
| Byte 4 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| Parity byte | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Which bit is in error?
- AByte 2, bit 6
- BByte 2, bit 1
- CByte 3, bit 6
- DByte 6, bit 2
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
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.
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.
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.
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.
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.
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.
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 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.