Study Guide Instructor view
Error Detection
Teaching notes for Lesson 4.3, with controls for presenting it.
Keep this page on your own screen. Share only the lesson window. The lesson window holds no teaching notes, so sharing it cannot show them.
Presenting
- Open the lesson in its own window and share that window, not this one.
- Use Next and Previous here, or the lesson’s own, to move through the lesson. Next reveals one thing at a time: the next idea, or the answer to the question on screen, then the next step. Previous takes the last reveal back. The line below says what is on screen and what Next will show.
- Reveal hints and answers when the class is ready, and reset a demonstration before using it again.
The controls need JavaScript and a browser that supports BroadcastChannel. Without them, open the lesson in presentation mode and use its own controls.
The two windows talk to each other only inside this browser, on this device. Nothing is sent to a server, and no account is needed. A second device (a phone or another tablet) cannot follow the lesson window yet.
Now on the lesson window
- On screen
- Next teaching point
Guidance for this point
Lesson plan
- Level
- Intermediate
- Time
- About 90 minutes; the steps below add up to 90
Starting from the playground game of whispers, learners discover that a sender can add something worked out from the data for the receiver to check. They meet the three kinds of damage (loss, gain, change) and then five methods in turn: the parity bit and parity block, the checksum, the echo check, the check digit and automatic repeat query. For each method the key questions are what is worked out, who compares it, and what it cannot do. This is a long lesson: plan a break after the parity block or split it over two sessions.
Objectives
- Explain how errors occur in data transmission through interference, as data loss, data gain and data change
- Add an even or odd parity bit to a byte, check a received byte, and use a parity block to find a single flipped bit
- Calculate a simple checksum and use it to decide whether data has arrived correctly
- Describe an echo check and explain what it cannot tell you
- Calculate and verify an ISBN-13 or EAN-13 check digit, and explain what a check digit is used for
- Describe how automatic repeat query uses positive and negative acknowledgements and a timeout
Before the lesson
- Mini whiteboards and counters or coins for counting 1s in bytes quickly.
- The parity block printed or drawn large so that rows and columns can be counted with the pen.
- A calculator is helpful for the checksum and check-digit steps, but ask for the working in writing.
- A book or product with a barcode to hold up for the check digit step.
- Decide in advance where to stop if the session is split: after the parity block is a natural place.
Steps
Introduction Opening
On the lesson window now
On screen: the lesson’s title, module and number; Next adds its objectives and key terms, as the lesson page lists them; Next again begins the first step.
Objectives on screen
- Explain how errors occur in data transmission through interference, as data loss, data gain and data change
- Add an even or odd parity bit to a byte, check a received byte, and use a parity block to find a single flipped bit
- Calculate a simple checksum and use it to decide whether data has arrived correctly
- Describe an echo check and explain what it cannot tell you
- Calculate and verify an ISBN-13 or EAN-13 check digit, and explain what a check digit is used for
- Describe how automatic repeat query uses positive and negative acknowledgements and a timeout
Purpose: Starting from the playground game of whispers, learners discover that a sender can add something worked out from the data for the receiver to check. They meet the three kinds of damage (loss, gain, change) and then five methods in turn: the parity bit and parity block, the checksum, the echo check, the check digit and automatic repeat query. For each method the key questions are what is worked out, who compares it, and what it cannot do. This is a long lesson: plan a break after the parity block or split it over two sessions.
1. A message that changes on the way Think 8 min
On the lesson window now
Purpose: Learners see that data can change on its way, name the three kinds of damage, and think of how a receiver could tell without knowing the original.
Ask
- How might data in a cable or through the air be changed, and how could the receiver tell without knowing the original?
- In the sent and received bits, which is loss, gain or change?
Responses to expect
- Electrical noise, a weak signal over a distance, other signals; the sender adds something worked out from the message for the receiver to work out again
- Fewer bits is loss, more is gain, the same number with one different is change
Misconceptions to challenge
- A learner may believe: “A receiver can only tell by comparing with the original.” Respond: The receiver never sees the original; it has to use something sent with the data.
- A learner may believe: “Every error is a change of a bit.” Respond: Bits can also be lost or gained: count the bits before comparing them.
On the board or with the pen
- Write the three damages with a short bit example each, then write ‘how can the receiver tell?’ as the question for the whole lesson.
Checking understanding: The kinds-of-error table: count the bits before comparing.
Depending on the answers
- If learners compare bit by bit without counting: ask them how many bits were sent and how many arrived.
English as an additional language
- Check interference, loss, gain and change; use the word ‘whisper’ with a gesture.
Discussion pause: Play a quick game of whispers with one sentence passed along four learners; compare the start and the end.
In the lesson window
- Think it through: Data travelling through a cable or through the air can be changed in the same way. How might it happen, and how could the receiver tell that a message had been changed, without knowing the original?
2. An extra bit that makes the count of 1s even Discover 16 min
On the lesson window now
Purpose: Learners work out an extra bit that makes the count of 1s even, then learn parity and use it to check a received byte, and discover what it cannot detect.
Ask
- The seven data bits are 1011001. How many 1s are there, and what must the spare bit be for an even count?
- The byte 10110101 arrives under even parity. What does the receiver conclude?
- Two bits change, and 01111011 arrives instead of 01011001. What does the parity check report?
Responses to expect
- Four 1s, so the parity bit is 0
- There is an error: five 1s is an odd number
- No error: six 1s is even, so a parity check can miss an even number of changes
Misconceptions to challenge
- A learner may believe: “The byte is correct because there are more 1s than 0s (check-received-byte option A).” Respond: The rule does not compare 1s with 0s. What does even parity say about the number of 1s?
- A learner may believe: “The byte is correct because it ends with a 1 (option B).” Respond: The parity bit’s position does not matter to the test. Count all the 1s in the whole byte.
- A learner may believe: “An error is reported, because two bits changed (two-bits-flip option B).” Respond: Count the 1s in 01111011. Does the receiver know how many changes there were, or only the number of 1s?
- A learner may believe: “A parity check shows which bit changed.” Respond: It only shows that an odd number of bits changed; it cannot say which.
- A learner may believe: “Odd parity means the byte has one 1.” Respond: Odd parity means the total number of 1s is odd, including the parity bit.
On the board or with the pen
- Write 0 1011001 with the parity bit separated, count the 1s with the pen and write 4 beside it.
What learners should notice
- The receiver counts every 1 in the whole byte, including the parity bit.
Checking understanding: The parity-bits table, the check-received-byte question, and the two-bits-flip question, in that order.
Depending on the answers
- If learners miscount the 1s: ask them to put a tick over each 1 with the pen and count the ticks.
- If learners are fluent: ask for a change of two bits that passes and a change of three that fails.
Support
- Give a strip of eight boxes for each byte so that bits are counted one at a time.
English as an additional language
- Check parity, even, odd and spare bit; say even and odd with number examples.
Discussion pause: Thirty seconds of silent thinking on the 1011001 question before pairs compare.
In the lesson window
- Think it through: The seven data bits are 1011001. How many 1s do they hold? What must the spare bit be, so that the whole byte has an even number of 1s?
- Check your understanding: Two computers use even parity. The byte 10110101 arrives. What does the receiver conclude?
- Apply it: Using even parity, the byte 01011001 is sent. Interference changes two bits, and 01111011 arrives. What does the parity check report?
3. Finding the bit that flipped: parity blocks Predict 18 min
On the lesson window now
Purpose: Learners predict how rows and columns can be used together to find a single flipped bit, then work out the parity byte and locate an error in a received block.
Ask
- If one bit changes, which row and column will fail their checks, and how could the receiver use both?
- Which bit changed, if row 2 and column 5 fail?
Responses to expect
- The row and column that fail cross at the changed bit
- Row 2, column 5, which was 1 before: the bit is now 0
Misconceptions to challenge
- A learner may believe: “The bit is in row 2, column 3 (which-bit-flipped option A).” Respond: Column 3 passed its check. Which column failed?
- A learner may believe: “The bit is in row 4, column 5 (option C).” Respond: Row 4 passed its check. Which row failed?
- A learner may believe: “The parity byte is the faulty row (option D).” Respond: The parity byte passed its check like rows 1, 3 and 4. Which single row failed?
- A learner may believe: “A single parity check can find the bit that flipped.” Respond: A single check cannot; the block gives a row and a column, and the bit is where they cross.
On the board or with the pen
- Draw the block as a grid and mark failing rows and columns with the pen; circle where they cross.
What learners should notice
- The parity byte is made of the parity bits of the columns.
Checking understanding: The column-parity table, the row and column counts, and the which-bit-flipped question.
Depending on the answers
- If learners count columns wrongly: have them tick down each column with the pen and say the count aloud.
- If time is short: give learners the row counts and ask only for the column counts, or end the session here.
Support
- Hand out a printed block for learners to mark with a pen.
Stretch
- What would the receiver see if two bits in the same row flipped? If two bits in different rows and columns flipped?
In the lesson window
- Think it through: Suppose one bit in the middle of a block changes. The parity check of its row will fail, because that row now has the wrong number of 1s. If the columns have a parity check too, what will happen to the column that bit is in? How could the receiver use the two together?
- Check your understanding: Row 2 fails and column 5 fails; every other row and column passes. Which bit changed, and what was it before?
4. A sum worked out from the data: the checksum Explain 12 min
On the lesson window now
Purpose: Learners propose sending the total of four numbers, then use a simple checksum (sum, remainder after dividing by 256) and decide what a mismatch means.
Ask
- How could a shop send one extra number so that the head office can check the four numbers it received?
- The receiver gets 60, 130, 99 and 188 with the checksum 213 and works out 221. What can it conclude?
Responses to expect
- Add the four numbers and send the total; the head office adds what it received and compares
- An error has occurred, because 221 is not 213, so the data or checksum changed
Misconceptions to challenge
- A learner may believe: “The data arrived correctly, because a checksum is only a rough guide (checksum-compare option A).” Respond: If the receiver’s checksum is different from the one sent, what has the check found?
- A learner may believe: “Only the checksum was damaged, so the data is fine (option B).” Respond: The receiver cannot tell where the damage is. Which values changed: the data, the checksum, or either?
- A learner may believe: “Data cannot change on the way (option C).” Respond: Interference can change data, as the first step showed.
- A learner may believe: “A matching checksum proves the data is correct.” Respond: It makes an error unlikely, not impossible: the same bytes in a different order give the same total.
On the board or with the pen
- Write the four numbers, add them in a column with running totals, and then show 485 ÷ 256 = 1 remainder 229.
What learners should notice
- The checksum is kept to one byte by keeping the remainder after dividing by 256.
Checking understanding: The checksum-calculation table, and the checksum-compare question with four options.
Depending on the answers
- If learners do not understand the remainder: show 469 − 256 = 213 and say ‘subtract 256 until the number is less than 256’.
- If learners are secure: ask for two different sets of bytes with the same checksum.
English as an additional language
- Check checksum, total and remainder; use ‘remainder’ with the example of 7 ÷ 2.
In the lesson window
- Think it through: A shop sends four numbers to its head office: 200, 150, 90 and 45. How could it send one extra number that lets the head office check that nothing was changed on the way? What would the head office do?
- Check your understanding: The data 60, 130, 99 and 180 is sent with the checksum 213. The receiver gets 60, 130, 99 and 188 with the checksum 213, and works out 221 from the data. What can it conclude?
5. Reading the number back: the echo check Predict 9 min
On the lesson window now
Purpose: Learners reason from reading a phone number back, then apply the echo check to LIBRARY and LIBRAAY.
Ask
- Why does reading the number back help, and if it is different, can the pupil tell where the mistake happened?
- Zara sends LIBRARY to a printer and gets LIBRAAY back. What does the echo check tell her?
Responses to expect
- Comparing it with what was said; the pupil knows something went wrong but not where
- Something changed on the round trip, so she sends the word again
Misconceptions to challenge
- A learner may believe: “The word arrived safely, because both words have the same number of letters (echo-library option A).” Respond: Compare them letter by letter. Are they the same word?
- A learner may believe: “The damage happened on the way to the printer, and the way back was clear (option B).” Respond: The check cannot say where the damage happened. Could the reply have been damaged instead?
- A learner may believe: “An echo check halves the traffic.” Respond: It doubles it, because every message is sent twice.
On the board or with the pen
- Draw the round trip as two arrows, there and back, and mark a ‘?’ on each to show the check cannot tell which was damaged.
Checking understanding: The echo-library check; ask for the weakness of the echo check in one sentence.
Depending on the answers
- If learners say the damage was on the way there: ask them to find a reason why the way back could be the one damaged.
English as an additional language
- Check echo, round trip and noisy line; use a phone call to show the idea.
Discussion pause: Silent thinking about the phone number question before sharing.
In the lesson window
- Think it through: Why does reading the number back help? And suppose the number read back is different from the number the pupil gave: can the pupil tell whether the friend misheard, or whether the line made a mistake when the friend read it back?
- Check your understanding: Zara sends the word LIBRARY to a printer, and her computer receives LIBRAAY back. What does the echo check tell her?
6. Checking numbers typed by people: check digits Discover 14 min
On the lesson window now
Purpose: Learners work out that a final digit could be calculated from the others, then use the 1, 3, 1, 3 rule of ISBN-13 and EAN-13 to find and check a digit.
Ask
- A librarian mistypes one digit of a 13-digit number. How could the number be designed so that the computer notices?
- The weighted total of an ISBN is 61. What should the system do?
Responses to expect
- The last digit is worked out from the first twelve; the computer repeats the calculation and rejects a mismatch
- Reject it, because 61 is not a multiple of 10
Misconceptions to challenge
- A learner may believe: “Accept it, because the total is a whole number (valid-isbn option B).” Respond: Any total is a whole number. What must the total of a valid number be?
- A learner may believe: “Any 13-digit number starting with 978 is valid (option C).” Respond: The first digits say what kind of number it is, not that it is correct. What does the last digit have to do?
- A learner may believe: “A remainder of 0 gives a check digit of 10.” Respond: If the remainder is 0, the check digit is 0, not 10.
- A learner may believe: “A check digit proves the number is for the right product.” Respond: It shows the number was probably typed correctly; a different valid number would also pass.
On the board or with the pen
- Write the digits with their weights under them and the products below; add them and show the remainder and 10 minus the remainder.
What learners should notice
- Weights 1 and 3 alternate across the twelve digits.
Checking understanding: The barcode-check-digit table (remainder 0 gives check digit 0), then the valid-isbn question.
Depending on the answers
- If learners misapply the weights: mark the weights 1 3 1 3 above the digits before any multiplication.
- If learners are secure: ask why swapping two digits that differ by 5 might not be noticed.
Support
- Provide the weights row pre-printed above empty boxes for the digits.
In the lesson window
- Think it through: A librarian types the 13-digit number of a book and makes one mistake in a digit. How could the number be designed so that the computer notices the mistake straight away?
- Apply it: A librarian types the ISBN 9780001112323. Multiplying the thirteen digits by 1, 3, 1, 3 … and adding gives a total of 61. What should the system do?
7. Asking for the data again: automatic repeat query Experiment 9 min
On the lesson window now
Purpose: Learners work out what a receiver and sender should do in three cases, then meet acknowledgements and the timeout in automatic repeat query.
Ask
- A packet arrives correctly, arrives damaged, or never arrives. What does the receiver do in each case, and what does the sender do if it hears nothing?
- The timeout ends and no acknowledgement has arrived. What does the sender do?
Responses to expect
- Positive acknowledgement; negative acknowledgement; nothing, so the sender must decide to send again after a timeout
- It sends the packet again, because the packet or its reply may have been lost
Misconceptions to challenge
- A learner may believe: “It assumes the packet arrived, because no error was reported (arq-timeout option A).” Respond: The receiver only reports an error if the packet arrives. What if the packet never arrived?
- A learner may believe: “It waits for a negative acknowledgement however long that takes (option C).” Respond: If the packet was lost, a negative acknowledgement may never come. What would the sender do if it waited for ever?
- A learner may believe: “ARQ finds the errors by itself.” Respond: ARQ needs a check such as parity or a checksum; it is the method for sending again.
On the board or with the pen
- Draw sender and receiver with arrows for the packet, positive acknowledgement, negative acknowledgement and timeout clock.
Checking understanding: The arq-timeout question.
Depending on the answers
- If learners mix up positive and negative acknowledgements: link positive to ‘received well’ and negative to ‘please send again’.
English as an additional language
- Check acknowledgement, timeout and repeat; use the parcel text message as the picture.
In the lesson window
- Think it through: A sender sends a packet and waits. Three things could happen: the packet arrives correctly; the packet arrives damaged; the packet never arrives. What should the receiver do in each case, and what should the sender do if it never hears back?
- Apply it: A sender sends a packet and waits. The timeout ends and no acknowledgement of any kind has arrived. What does the sender do?
8. Choosing the right check Consolidate 4 min
On the lesson window now
Purpose: Learners choose the right method for typed data and explain two methods and their limits.
Ask
- A technician types a 12-digit stock code. Which method lets the computer notice a typing mistake at once?
- Choose two of the five methods and explain how each works and one thing it cannot do.
Responses to expect
- A check digit
- For example parity (cannot find an even number of changes) and echo check (cannot say where the error happened)
Misconceptions to challenge
- A learner may believe: “A parity check suits typed codes (choose-the-method option A).” Respond: A parity check finds a flipped bit in transmitted data. Is the problem here that a bit flipped, or that a person mistyped a digit?
- A learner may believe: “An echo check works because the code is sent back to the technician (option B).” Respond: An echo check compares a copy sent back to the sender. What would the technician be comparing?
Checking understanding: Collect two explanations and check each for: what is worked out, who compares, and what it cannot do.
Depending on the answers
- If learners have forgotten a method: start the next lesson with a one-line review table of the five methods.
In the lesson window
- Apply it: A school’s office computer receives a 12-digit stock code typed in by a technician. The office wants the computer to notice a typing mistake at once. Which method should it use?
- Think it through: Choose two of the five methods in this lesson (parity, checksum, echo check, check digit, automatic repeat query). Explain, in your own words, how each works, and one thing it cannot do.
Lesson recap Closing
On the lesson window now
On screen: the lesson’s objectives again; Next adds the closing question, which asks the class to explain each one in their own words without looking back. It says nothing about what anyone has learnt: use the answers to decide what to revisit.
Points to listen for
- Interference can cause data loss, gain or change, so receivers need to check for errors.
- Parity adds a bit so that the number of 1s is even or odd; a parity block finds a single flipped bit where its failing row and column cross; parity misses an even number of changes.
- A checksum is a value worked out from the data and recalculated by the receiver; an echo check sends a copy back but cannot say where an error happened.
- A check digit is worked out from the other digits for data entry (ISBN-13 and EAN-13 use weights 1, 3, 1, 3 and a total that is a multiple of 10).
- Automatic repeat query uses acknowledgements and a timeout so that damaged or lost packets are sent again.
Consolidation
- Interference can cause data loss, gain or change, so receivers need to check for errors.
- Parity adds a bit so that the number of 1s is even or odd; a parity block finds a single flipped bit where its failing row and column cross; parity misses an even number of changes.
- A checksum is a value worked out from the data and recalculated by the receiver; an echo check sends a copy back but cannot say where an error happened.
- A check digit is worked out from the other digits for data entry (ISBN-13 and EAN-13 use weights 1, 3, 1, 3 and a total that is a multiple of 10).
- Automatic repeat query uses acknowledgements and a timeout so that damaged or lost packets are sent again.