The error detection method used by the higher-layer protocols is called checksum. Checksum is based on the concept of redundancy. Here, the sender uses checksum generator and the receiver uses checksum checker.
The checksum generator subdivides the data unit into equal segments of n bits (usually 16). These segments are added together. The complement of the result obtained by adding the segments, called the checksum field, is added to the end of the original data unit as the redundancy bit. The sender transmits the data unit plus checksum.
The example data unit consists of 16 bits as: 10101001 00111001. The data unit is divided into two segments of S bits as: 10101001 and 00111001. Both segments are added (using one's complement arithmetic) as:
10101001 00111001 11100010 (sum)
Checksum is the complement of the sum, that is, it is 00011101. The checksum is added to the data unit.
The pattern sent is:
10101001 00111001 00011101
The receiver receives the above pattern. The receiver then adds the three
sections together, and will get all is, which, after complementing, is all Os. This show that there is no error in transmission. To summarize,
10101001 (data segment)
00111001 (data segment)
00011101 (checksum)
11111111 (sum)
00000000 (complement)

BACK |