Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1calculated == received_checksum | AIF calculated != received_checksum THEN request_resend | |
| 2calculated != received_checksum | BThe checksums differ, so an error has occurred and the data must be requested again | |
| 3The receiver works out its own checksum from the data it received, using the same method as the sender | CA resend is requested when the checksums match. It should only be requested on a mismatch, because a match means no error was detected. | |
| 4A mismatch means an error was found, so the receiver asks the sender to send the data again | DThe checksum the receiver worked out matches the one sent, so no error is detected | |
| 5IF calculated == received_checksum THEN request_resend | Ecalculated = checksum(received_data) | |
| 6A mismatch means the checksum is corrupted, so the data must be fine | FThe checksum itself can be corrupted in transmission, so a mismatch does not prove which part is wrong. Either way, the data is requested again. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
recalculate and compare — The receiver recalculates the checksum from the received data and compares it with the one sent. Match means no error detected; mismatch means error, so resend is requested.IF calculated = sent THEN
OUTPUT "No error detected"
ENDIFIF calculated <> sent THEN
OUTPUT "Request data again"
ENDIFIF calculated = sent THEN OUTPUT "OK"
ELSE OUTPUT "Request resend"
ENDIFcalculated ← SUM(received) MOD 256
IF calculated = sent THEN OUTPUT "OK"
ENDIF// Data is fine but checksum corrupted
IF calculated <> sent THEN OUTPUT "Resend"
ENDIF