A checksum is a compact test over packet bytes. This lesson separates detection from correction before the arithmetic starts.

highlighted = computed this step

Why a checksum exists

A checksum is a small value carried with bytes so a receiver can detect many changes. It detects corruption; it does not correct the packet.

word bits=16\text{word bits}=16

Start with exact words

The first checksum word here is 0x4500. The later sum uses exact 16-bit words like this one.

0x45000x4500
One checksum wordA checksum is computed from exact words, not prose.First word16 bits / 2 bytes0x4500byte 0byte 10100010100000000word0x4500

What it can and cannot catch

A checksum catches every single-bit error and many multi-bit errors. It is not a proof that the packet was never changed, because compensating changes can cancel.

example word=0x4500\text{example word}=0x4500
One checksum wordA checksum is computed from exact words, not prose.First word16 bits / 2 bytes0x4500byte 0byte 10100010100000000word0x4500

Summary

A checksum is error detection over exact words, not error correction. Error detection over the exact bytes; timing/throughput is not modeled here.

detects changes=1\text{detects changes}=1
One checksum wordA checksum is computed from exact words, not prose.First word16 bits / 2 bytes0x4500byte 0byte 10100010100000000word0x4500