Error detection
แนะนำใหม่
10:32
การส่งข้อมูล
คุณส่งรูปภาพให้เพื่อนที่อยู่อีกฟากโลก มันไม่ได้เดินทางในรูปแบบก้อนเดียว แต่ถูกแบ่งออกเป็นแพ็กเก็ตเล็กๆ จำนวนนับร้อยๆ แพ็กเก็ต โดยแต่ละแพ็กเก็ตจะมีป้ายกำกับ…
บรรยายภาษาอังกฤษ · สลับคำบรรยายภาษาอังกฤษและภาษาจีนได้
ในบทเรียนนี้
| English | ความหมาย |
|---|---|
| interference/ˌɪntəˈfɪərəns/ | สัญญาณรบกวน |
| bits/bɪts/ | A binary digit, taking the value zero or one. |
| receiver/rɪˈsiːvə/ | |
| check digit/tʃek ˈdɪdʒɪt/ | ตัวเลขตรวจสอบ |
| parity check/ˈpærɪti tʃek/ | การตรวจสอบคู่-คี่ |
| parity bit/ˈpærɪti bɪt/ | บิตคู่-คี่ |
| byte/baɪt/ | A group of eight bits, commonly used as a unit of data storage. |
| Even parity | The total number of 1s must be even. |
| odd parity | |
| checksum/ˈtʃeksəm/ | ผลรวมตรวจสอบ |
| echo check/ˈekəʊ tʃek/ | การตรวจสอบกลับส่ง |
| ARQ | Acknowledgements + timeout resend. |
| acknowledgement/əkˈnɒlɪdʒmənt/ | การยืนยัน |
| timeout/ˈtaɪmaʊt/ | เวลาหมดอายุ |
| packet/ˈpækɪt/ | Units of data sent through a network, containing payload and control information such as addressing details. |
| barcodes/ˈbɑːkəʊdz/ | Machine-readable arrangements of bars and spaces that encode identifiers or other data. |
| ISBNs | |
| transposition/trænspəˈzɪʃn/ | การสลับตำแหน่ง |
| phonetic errors |
การตรวจสอบความผิดพลาด
- ขณะข้อมูลกำลังเดินทาง interference อาจทำให้ข้อมูลเปลี่ยนแปลง — bit หายไป, เพิ่มเข้ามา หรือเปลี่ยนสถานะ
- ดังนั้นผู้รับจึง ตรวจสอบ ว่าข้อมูลมาถึงถูกต้องหรือไม่
- มีหลายวิธีในการทำเช่นนี้ รวมถึง check digit สำหรับตัวเลขที่พิมพ์ใส่
ห้องปฏิบัติการแนวคิดการคำนวณ
Classify concrete examples by the computing idea they demonstrate.
Parity check
- Parity check เพิ่ม parity bit หนึ่งตัวเข้าไปในแต่ละ byte
- Even parity: จำนวนรวมของเลข 1 ต้องเป็น เลขคู่; odd parity: ต้องเป็น เลขคี่
- ผู้รับนับจำนวนเลข 1; หาก parity ผิดพลาด แสดงว่าเกิดข้อผิดพลาด
- มันไม่สามารถจับทุกความผิดพลาดได้ — ถ้า สอง bit เปลี่ยนสถานะ จำนวนนับอาจยังดูถูกต้องอยู่

ตัวอย่างรูปร่างของหัวต่อ USB บางอย่าง ใช้มาตรฐาน USB เดียวกัน ดังนั้นอุปกรณ์จะถูกตรวจจับอัตโนมัติ.

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.
Checksum, Echo check และ ARQ
- Checksum — ค่าที่คำนวณจากข้อมูลก่อนส่ง; ผู้รับคำนวณค่าใหม่อีกครั้งแล้วเปรียบเทียบ หากไม่ตรงกัน → ส่งใหม่
- Echo check — ผู้รับส่งข้อมูลกลับไปยังผู้ส่ง; ผู้ส่งเปรียบเทียบกับต้นฉบับ (ช้า — ข้อมูลถูกส่งสองครั้ง)
- ARQ (Automatic Repeat reQuest) — ผู้รับส่งการยืนยัน/ปฏิเสธ acknowledgement; หากไม่มีการยืนยันเชิงบวกก่อน timeout, ผู้ส่งจะส่งซ้ำ

Serial ส่งบิตหนึ่งตัวต่อครั้งผ่านสายเดียว; parallel ส่งหลายบิตพร้อมกันผ่านหลายสาย.

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.
เลขประจำตำแหน่งตรวจสอบ
- Check digit คือตัวเลขเพิ่มท้ายชุดตัวเลข ซึ่งคำนวณจากตัวเลขอื่น ๆ — ใช้กับตัวเลขที่ พิมพ์เข้าเครื่อง (บาร์โค้ด, ISBNs).
- เมื่อป้อนเข้าไป จะถูกคำนวณใหม่และเปรียบเทียบกับค่าเดิม
- มันตรวจจับ ตัวเลขผิดพลาด, การสลับตำแหน่ง (สองตัวเลขสลับกัน 21→12), ตัวเลขหาย/เกินมา, และข้อผิดพลาดจากการออกเสียง

Parity bit ถูกเพิ่มเข้าไปเพื่อให้จำนวนของ 1 เป็นคู่ (หรือคี่)
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.
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.
คุณเข้าใจแล้ว
- parity check = การนับจำนวน 1 เป็นคู่/คี่ ผ่าน parity bit; ไม่สามารถจับข้อผิดพลาด 2-บิตบางกรณีได้
- checksum = คำนวณใหม่และเปรียบเทียบ; echo check = ส่งข้อมูลกลับ
- ARQ = การยืนยัน + timeout ส่งซ้ำ
- check digit ตรวจจับความผิดพลาดในการพิมพ์ (ตัวเลขผิด, การสลับตำแหน่ง) ในบาร์โค้ด/ISBNs
เกิดปัญหาอะไรขึ้น? เฉพาะทีมเว็บไซต์เท่านั้นที่เห็นข้อมูลนี้