Error Detection Code-Checksum


In the networking system, when one transmits the data it is very obvious that factors like interference, noise, and other disturbances can add to the transmitted signal which causes data corruption and it may lead to significant problems like mishearing, wrong interpretation therefore it is very important to make sure that transmitted data should be reliable, noise-free.

To avoid above mentioned critical problem some techniques are there called error detection codes like CRC (Cycle redundancy check), Checksum which we are going to discuss in this article these error detection codes are added to the header of the data packet and the sender and receiver does some calculation to check whether the data packet is error free not. One of the most popular codes is Checksum which we will discuss in this article.

Checksum

A checksum is a value that is computed for the transmitting data and used to detect errors in the data packet. The value of the checksum is computed by adding all the bytes in the data packet, and the result is then complemented. And the complemented value is the checksum which is added to the data before transmission.

When the data is received on the receiver side again checksum is recomputed and complemented and matched from the checksum value which is put in the checksum header. And if matched the data is said to be accurate and noise-free, error-free. And if not matched the data is corrupted, some noise is added or interference occurred.

Let’s understand through one example

Suppose, the sender wants to send the following data packet: 10101011 00110011 11001100 here I have put spaces to separate byte by byte, for clarification.

To computer the checksum for the above data packet

Step-1 − Add all the bytes of the data packet

10101011 + 00110011 + 11001100 = 0110101001

And if we need to complement this 0110101001 we will get 1001010110

And this complemented value is put into the header to the checksum header field.

Step-2 − Again receiver also does the same step for the data packet and gets complimented checksum then matches with the checksum value present in the header if it matches then no error in the data packet

And if does not match then some error occurs during the transmission of the data packet. And such packets need to be retransmitted.

Advantages and Disadvantages of Using Checksum

Checksum codes have many advantages and disadvantages. Some of the advantages of the checksum are mentioned below.

Advantages

  • Simple to implement − It is very simple to implement and uses very minimal hardware and software resources.

  • Efficient − Checksum codes can detect the most common errors in digital communication.

  • Fast − Checksum codes can be computed very quickly because there is nothing much to do here, which is why it is suitable for real-time data packet transmissions.

  • Low Latency − As we discussed it won’t use many resources and very few computations that’s why latency is very low here.

Disadvantages

  • Limited Error Detection Capability − it is versatile and easy to implement having less complexity but the main problem is it is limited to very common errors in other words it can detect very common errors.

  • Limited Error Correction Capability − Checksum codes can detect errors in the data packet but they can’t correct them. So it is only an error detection technique.

  • Susceptible to errors − Checksum codes can be susceptible to errors, especially in cases where multiple errors occur in the same data packet.

  • Sensitivity to the Data Packet size − checksum codes are sensitive to the length of the data packet, if the size of the data packet is too small then very high chances are there that it might miss the error or it won’t be able to detect the error. While the data packet size is large, the overhead of the checksum increases. Therefore, the data packet size has to be selected carefully to get efficient performance.

Overall checksum codes are good to have for the error detection method in the transmission but we have taken care of proper data packet length which to get the best outcome.

Conclusion

The use of error detection codes such as CRC (Cyclic redundancy check), Checksum is very important in ensuring that transmitted data is reliable and error-free, noise-free. The simplicity and efficiency of the checksum are to make it a popular choice in digital communication systems. However, it also has its limitations such as limited error detection and correction capability, susceptibility to errors, and sensitivity to the data packet size as we discussed why it is so.

Despite having many drawbacks, checksum remains an effective technique for error detection in digital communication. Applications such as real-time scenarios and widely used in file transfer and database management. To maximize its effectiveness, it is important to carefully select the data packet size to ensure that the checksum is properly implemented. Overall, the checksum is an essential technique in ensuring the integrity and accuracy of the transmitted data.

Updated on: 26-Apr-2023

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements