Lesson 63: Echo check
此页面需较新浏览器(支持 SharedArrayBuffer)。请升级 Chrome、Edge、Firefox 或 Safari 至最新版本。
English
Send it back and compare
- After data is sent, how does the sender know it arrived correctly?
- In an echo check, the receiver sends a copy of the data back. The sender compares the copy with the original.
- Same: the data is OK. Different: there was an error, so the data is sent again.
Words for this lesson
| Word | Meaning |
|---|---|
| echo check | the receiver returns the data; the sender compares |
| original | the data that was sent |
| copy | the data that came back |
English
Error detection methods
| Method | Lesson | What is compared? |
|---|---|---|
| parity check | 39 | the number of 1 bits |
| check digit | 41 | a digit worked out from the others |
| checksum | 55 | a value worked out from the data |
| echo check | 63 | the whole data, sent back |
English
In the exam
- 0478/13/O/N/24 Q2(f)(i): explain how an echo check finds errors in data. Mark scheme: a copy of the data is sent back to the sender; the sender compares the data it sent with the data it received back; if they do not match, an error has occurred.
- 0478/12/F/M/24 Q6: a self-driving tractor and the farmer's computer use an echo check: one device sends, the other returns a copy, and the first one compares.
难度 3/5 · 今日首次完成可获 200 金币及少量额外奖励
在 echo check, the receiver sends a copy of the data back, and the sender compares it with what it sent. Here you type both, with a | between them: HELLO|HELLO. The program splits them into sent and echo. If they are the same, light the green LED (pin 12) and print Echo OK; if not, light the red LED (pin 13) and print Error: send again.
点击“运行”查看此处输出。
难度 4/5 · 今日首次完成可获 280 金币及少量额外奖励
查找 where the echo is different. If the lengths are different, the program already says so. If not, compare the characters one by one and print the position of each one that is not the same, counting from 1, for example HELLO|HEMLP gives Different at: 3 5.
点击“运行”查看此处输出。