Lect 5
Lect 5
Correction
Next Topic
Error detection and correction
0101001 1
How many simultaneous bit 1101001 0
errors can it detect? 1011110 1
0001110 1
0110100 1
Which errors can it correct? 1011111 0
1111011 0
Checksums
Used in Internet protocols (IP, ICMP, TCP, UDP)
Basic Idea: Add up the data and send it along
with sum
Algorithm:
checksum is the 1s complement of the 1s
complement sum of the data interpreted 16
bits at a time (for 16-bit TCP/UDP checksum)
1s complement: flip all bits to make number
negative
Consequence: adding requires carryout to be
added back
CRCs (Cyclic Redundancy
Check)
Stronger protection than checksums
Used widely in practice, e.g., Ethernet CRC-32
Implemented in hardware (XORs and shifts)