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 | |
|---|---|---|
| 1Sent: 10110010 Received: 1011010 | AThe received word is longer, with an extra character, so this is data gain, not data change. | |
| 2Sent: CAT Received: CATS | BSent: HELLO Received: HELO | |
| 3The length is the same but one value is different, so the error is data change | CBoth patterns are 4 bits long and only the last bit differs, so this is data change, not data loss. | |
| 4Count first: 5 characters sent but only 4 received, so the error is data loss | DData gain: an extra character has appeared that was not sent | |
| 5Sent: 1010 Received: 1011 (data loss) | EData loss: the received pattern is shorter, so a bit has gone missing | |
| 6Sent: DOG Received: DOGS (data change) | FSent: 1100 Received: 1110 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
compare sent and received — Compare the data sent with the data received. Fewer bits or characters means loss, extra ones means gain, and the same length with different values means change.IF LENGTH(received) < LENGTH(sent) THEN
error ← "loss"
ENDIFIF LENGTH(received) > LENGTH(sent) THEN
error ← "gain"
ENDIFIF LENGTH(sent) = LENGTH(received) THEN
IF sent <> received THEN
error ← "change"sent ← "10110010"
received ← "10110110"
IF sent <> received THEN OUTPUT "change"sent ← "CAT"
received ← "CART"
n ← LENGTH(received) - LENGTH(sent)