Error detection
引入本课内容
| English | 释义 | 拼音 |
|---|---|---|
| interference/ˌɪntəˈfɪərəns/ | 干扰 | gān rǎo |
| bits/bɪts/ | 位 | wèi |
| receiver/rɪˈsiːvə/ | 接收方 | jiē shōu fāng |
| check digit/tʃek ˈdɪdʒɪt/ | 校验码 | jiào yàn mǎ |
| parity check/ˈpærɪti tʃek/ | 奇偶校验 | jī ǒu jiào yàn |
| parity bit/ˈpærɪti bɪt/ | 奇偶校验位 | jī ǒu jiào yàn wèi |
| byte/baɪt/ | 字节 | zì jié |
| Even parity | 偶校验 | ǒu jiào yàn |
| odd parity | 奇校验 | qí jiào yàn |
| checksum/ˈtʃeksəm/ | 校验和 | jiào yàn hé |
| echo check/ˈekəʊ tʃek/ | 回送校验 | huí sòng jiào yàn |
| ARQ | 自动重传请求 | zì dòng zhòng chuán qǐng qiú |
| acknowledgement/əkˈnɒlɪdʒmənt/ | 确认 | què rèn |
| timeout/ˈtaɪmaʊt/ | 超时 | chāo shí |
| packet/ˈpækɪt/ | 数据包 | shù jù bāo |
| barcodes/ˈbɑːkəʊdz/ | 条形码 | tiáo xíng mǎ |
| ISBNs | 国际标准书号 | guó jì biāo zhǔn shū hào |
| transposition/trænspəˈzɪʃn/ | 换位 | huàn wèi |
| phonetic errors | 音似错误 | yīn shì cuò wù |
检查错误
- 数据传输时,干扰可能改变数据——位可能丢失、增加或翻转。
- 因此,接收方会检查数据是否正确到达。
- 有几种方法可以做到这一点,此外还可以用校验数字检查键入的数字。
计算概念实验
Classify concrete examples by the computing idea they demonstrate.
奇偶校验
- 奇偶校验为每个字节添加一个校验位。
- 偶校验:1 的总数必须是偶数;奇校验:1 的总数必须是奇数。
- 接收方数出 1 的个数;如果奇偶性不正确,就说明发生了错误。
- 它无法检测出所有错误——如果两个位翻转,计数可能仍然看起来正确。

In an even-parity system, the parity bit is set so that:
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Even parity makes the count of 1s even; the receiver re-counts to detect a single-bit error.
A parity check catches a single flipped bit, but if TWO bits flip the 1-count's parity can still look correct, hiding the error.
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
That blind spot is why stronger checks (checksums, CRC) are used when reliability really matters.
校验和、回声校验和 ARQ
- 校验和——发送前根据数据计算出的一个值;接收方重新计算并比较。如果不匹配 → 重发。
- 回声校验——接收方把数据发回去;发送方将其与原始数据比较(速度慢——数据要发送两次)。
- ARQ(自动重传请求)——接收方发送肯定或否定的确认;如果在超时前没有收到肯定确认,发送方就会重发。

A checksum detects errors by:
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
The receiver recomputes the checksum; if it differs from the sent one, the data is resent.
In ARQ, the sender resends a packet when:
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
ARQ uses acknowledgements and a timeout timer; no positive ack in time → resend.
校验数字
- 校验数字是一个数末尾的额外数字,由其他数字计算得出——用于键入的数字,例如条形码和 ISBN(国际标准书号)。
- 输入时,校验数字会被重新计算并比较。
- 它可以检测出错误的数字、易位(两个数字交换位置,如 21→12)、缺失或多余的数字,以及音似错误。
Match each error-detection method to how it works.
难度 2/5 · 今日首次完成可获 140 金币及少量额外奖励
Parity and checksums detect errors in transit; a check digit guards typed-in numbers; ARQ triggers the resend.
例题:这个字节正确吗?
一个系统使用偶校验。接收方收到 10110101。是否发生了错误?然后说明如果两个位翻转会发生什么。
- 数一数 1 的个数:1、1、1、1、1,所以共有五个 1。五是奇数,但偶校验要求 1 的个数为偶数,因此检测到了错误,字节会被重新发送。
- 如果一个正确的字节
10110100(有四个 1)中有两个位翻转,变成11110000,它仍然有四个 1。奇偶校验会通过,错误被漏掉,因此也可以使用校验和或回声校验。
With odd parity, which parity bit is added to the 7 data bits 1100101?
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
There are four 1s; a parity bit of 1 makes five, which is odd.
In an echo check, the receiver sends the data back and the sender compares it with the original.
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
The sender does the comparison; if the copies differ, the data is sent again.
你掌握了
- 奇偶校验 = 通过一个校验位偶/奇数 1 的计数;漏掉一些 2 位错误
- 校验和 = 重新计算并比较;回声校验 = 把数据发回去
- ARQ = 确认 + 超时重发
- 一个校验数字捕捉条形码/ISBN 中的键入错误(错误的数字、易位)
出了什么问题?只有网站团队能看到这些信息。