Checksum Algorithm in Networking
The Checksum is an error detecting method that is applied to the higher layer protocols. In this technique, the generator subdivides the data unit into equal segments of n bits. These segments are added using 1’s complement method in a way such that the result is also n-bit long. The sum is then 1’s complemented and appended to the data unit as redundant bits that are called the Checksum field.
The receiver subdivides the data unit into segments of n bits. The segments are then added using 1’s complement method such that the result is n bit long. The result is then 1’s complemented. If it is zero then the data unit is correct, otherwise, there must be some error within it.
Steps of Checksum generation:
Steps of Checksum detection: