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 | |
|---|---|---|
| 1checksum = sum(data) % 256 | AThe checksum is not calculated from the data. It must come from the data using a set rule, so a made-up value cannot show whether the data changed. | |
| 2if received_checksum == calculated_checksum: | BThe sender calculates a value from the data itself using a set rule | |
| 3The checksum is sent with the data so the receiver can use it to check for errors | CThe receiver must calculate the checksum again from the received data and compare it. Receiving a checksum does not prove the data is correct. | |
| 4The sender and receiver must use the same calculation, so the receiver repeats the sender's rule | Dsend(data, checksum) | |
| 5checksum = 42 # a fixed number chosen at random | Enew_checksum = sum(received_data) % 256 | |
| 6Receiver: the checksum arrived, so the data must be correct | FThe receiver compares the sent checksum with the one it calculated again |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
checksum — A value calculated from a block of data by a set rule and sent with it. The receiver repeats the calculation and compares the results. If they differ, an error occurred.checksum ← SUM(data) MOD 256SEND data, checksumcalc ← SUM(received) MOD 256IF calc = checksum THEN
OUTPUT "No error found"IF calc <> checksum THEN
OUTPUT "Error detected"