Checksum Error Detection.

   The checksum error detection method is based on the concept of redundancy.  This means in this technique of error detection sender needs to send some extra bits (called redundant bits) with the original data so that the receiver will use these bits to detect an error. These redundant bits are called checksum bits. Checksum is a small-sized data generated by the sender’s data link layer.

To understand, how the sender generates checksum?  And how receiver detects an error using checksum? Let me explain the whole concept with an example. Suppose the data word that is data to send is

1011 0011 1011 1011 0101 1010

 The checksum error detection method has a checksum generator at the sender side.  There is a checksum checker at the receiver side to detect an error. The Checksum generator at the sender side generates the checksum and the checksum checker at the receiver side detects an error in the received data.

        To generate a checksum at the sender side, the sender performs four steps.

Checksum Generator (Sender)

      To generate a checksum at the sender side, the sender performs four steps.

Step-1

     The first step is to divide the given data unit into ‘k’ segments having ‘m’ number of bits. Here m is the size (number of bits) of the checksum.  Suppose the size of the checksum is 8 then the checksum generator will divide the given data unit into some k segments having 8 bits. So, for these cases, we will assume that the size of the checksum is 8 bits.  Therefore, we must divide this data unit into some segments having 8 bits. I have divided this data unit into 3 segments having 8 bits each. (k=3, and m = 8)

Step-2

     These segments are added using one’s complement arithmetic. In 1’s complement arithmetic or addition when there is a carry at the most significant bit (MSB). The carry forwarded and added in the result.  when we add these three segments we get the sum.

Step-3

     Step 3 is to complement the given sum to get the Checksum. Here sum is 1 1 0 0 1 0 0 1. The complement of this sum will be

0 0 1 1 0 1 1 0.  The complement of the resulting sum will be the checksum.

Step-4

     The checksum is appended to the data word to get the codeword.

Therefore, the codeword will be

Codeword:  1011 0011 1011 1011 0101 1010 0011 0110

 

       This code word is then sent by the sender. For this example, we assume that there is no error in the data transmission. So the receiver will receive the same data sent by the sender.

Received data: 1011 0011 1011 1011 0101 1010 0011 0110

     In case of computer communication, if there are 10 different terms to be carried out we can divide whole process of communication into 10 different parts or 10 different layers and assign one task to each layer in the communication process. We can also reduce number of players or number of parts in the communication process by assigning 2 functions to one layer.

Checksum Checker (receiver)

     To detect an error in the received data, the checksum checker at the receiver’s side also performs 4 steps.

Step-1

The first step is to divide the data unit into k segments having m bits each (m=8). So the checksum checker divides data unit in to 4 segments having 8 bits each.

1011 0011   segment-1

1011 1011   segment-2

0101 1010    segment-3

0011 0110    segment-4

Step-2

The second step is to add all these segments using 1’s complement arithmetic to get the sum. (as shown below).

Step-3

The third step is to complement the sum. In this example, the sum is : 1111 1111.  The complement of the sum will be 0000 0000.

Sum:                      1 1 1 1  1 1 1 1

Complement :  0000  0000

Step-4

     The fourth step is to check whether the received data is damaged during the transmission.

  1. If the complement of the sum calculated in step 3 is all zero; this indicates there is no error in the received data unit. The data unit will be accepted discarding the checksum bits.
  2. If the complement of the sum calculated in step 3 is non-zero; indicate there much be an error in the received data. Therefore, the data is rejected.
error: Content is protected !!