DC - MODULE 3 (my notes)
DC - MODULE 3 (my notes)
Q:6:- Checksum
• Checksum is an error-detecting technique.
Internet Checksum
• Internet has been using a 16-bit checksum.
• The sender or the receiver uses five steps
Fletcher Checksum
The Fletcher checksum weighs data items based on their position. There are two
algorithms:
1. 8-bit Fletcher: Works on 8-bit data items, producing a 16-bit checksum.
The calculation is done modulo 256 with two accumulators, L (sum of data)
and R (weighted sum).
2. 16-bit Fletcher: Works on 16-bit data items, producing a 32-bit checksum.
Both use modular arithmetic to compute the checksum.
Adler Checksum:
The Adler checksum is a 32-bit checksum similar to the 16-bit Fletcher, with
three key differences:
1. It calculates on single bytes instead of two.
2. It uses a prime modulus (65,521) instead of 65,536.
3. L is initialized to 1 instead of 0.
The prime modulus improves error detection in certain data combinations.