Checksum generation is an error detection method that is implemented in most network protocols and code systems. In communication protocols and transport protocols, the checksum can refer to the user data alone, but it can also be calculated from the user data, the header and the trailer and is transmitted in the data packet.
In code systems such as bar codes or 2D codes, the checksum is calculated to keep the error rate as low as possible when reading a code. In communication protocols, the checksum can be determined from the sum of all transmitted bits by means of a parity check. For this purpose, many protocols have a checksum field in which the checksum is entered. Other checksum methods use complicated mathematical algorithms, such as the cyclic redundancy checksum(CRC), the modulo method or the error correctingcode ( ECC).
Depending on the checksum method, the block checksum is divided by a specific number, the generator polynomial, and the non-divisible remainder is inverted and appended to the transmitted block checksum. The result is a unique checksum that is used toverify that the message was transmitted correctly. Usually , the checksum number is transmitted along with the end of the message. The receiving station uses the same algorithm, calculates the checksum and compares the number with the transmitted checksum. If the numbers are identical, the message is error-free, in the other case it is faulty and rejected.