Overview
Noise and interference on physical media can cause bits to flip (0 to 1 or vice versa). Error detection allows the receiver to know that the data it received is not what was sent.
Common Techniques
- Parity Bit: Adding a single bit to indicate if the number of set bits is even or odd.
- Checksum: Summing the numerical values of the data and sending the result. Used in IP, TCP, and UDP.
- Cyclic Redundancy Check (CRC): A more powerful mathematical algorithm used in Ethernet frames to detect multi-bit errors.
Error Correction
Some protocols use Forward Error Correction (FEC) to not only detect but also fix errors without needing retransmission, though this adds overhead.