Error Detection- Checksum Method

 What is Error..? Why does error occur..?  How to detect Errors..?

⧳ Error in computer networking occurs when receiver's information does'nt match with sender's information. 

 There can be several reasons which cause errors.  Generally error occurs during transmission of digital signals, while transmitting signals they may suffer from noise which introduces errors in binary bits. Error in binary bits can change polarity of binary bits i.e. 0 converts into 1 or vice versa.

To detect errors we add specific codes either in data link layer or Transport layer of OSI Model. When any message transmits, it may get corrupted or scrambled by noise. To avoid this weadd additional data in specific manner.

Here we are going to see how Checksum method of error detection works.

Checksum : In checksum method, first we get the data which is to be transmitted (D), then we divide that data into equal checksum bits (m) {m=8,16,32,.....} into D1,D2,D3,..... After this process we perform addition of those D1,D2,D3... by binary bit addition. We discard the MSB(most significant bit ) which is carry bit & take the 1's complement of remaining bits. result of one's complement is checksum bit. Then we create transmitting bit which formed by appending  checksum bit to original data. Now this is our data which is to be transmitted.

To check on receiver's end we perform same steps: i) First we take the received data then we divide it in 'm' bits as D1,D2,D3,....etc ii) Then we add this divided bits, similarly as bofore we discard the msb which is carry bit of result of addition. iii) After this we take one's complement of remaining result.

Now if the result contains any '1' in it then we conclude it as error is present.

And if there's no '1' i.e. all zeros then we conclude there's no error in transmission.

Eg.




Comments