What are Error-Detecting Codes?

Error-detecting codes are a sequence of numbers generated by specific procedures for detecting errors in data that has been transmitted over computer networks. These codes add redundant information to data to help identify transmission errors at the receiving end.

When bits are transmitted over computer networks, they are subject to corruption due to interference, noise, and network problems. The corrupted bits lead to spurious data being received by the receiver and are called errors.

Error-detecting codes ensure messages are encoded before transmission over noisy channels. The encoding is designed so that the decoder at the receiving end can detect whether there are errors in the incoming signal with high probability of success.

Features of Error Detecting Codes

  • Backward error correction support − Error detecting codes are adopted when backward error correction techniques are used for reliable data transmission. The receiver sends feedback to the sender indicating whether an error-free message was received. If errors are detected, the sender retransmits the message.

  • Block-based approach − Error-detecting codes are usually block codes, where the message is divided into fixed-sized blocks of bits, to which redundant bits are added for error detection.

  • Detection focus − Error detection involves checking whether any error has occurred. The number of error bits and the type of error does not matter for detection purposes.

Error Detection Techniques

There are three main techniques for detecting errors in data transmission:

Error Detection Techniques Parity Check Single bit error detection Simple & fast Checksum Arithmetic sum verification Moderate reliability CRC Polynomial division High reliability Increasing complexity and reliability ?

Parity Check

Parity check is performed by adding an extra bit, called a parity bit, to the data to make the number of 1s either even (even parity) or odd (odd parity).

While creating a frame, the sender counts the number of 1s and adds the parity bit as follows:

  • Even parity − If the number of 1s is even, the parity bit value is 0. If the number of 1s is odd, the parity bit value is 1.

  • Odd parity − If the number of 1s is odd, the parity bit value is 0. If the number of 1s is even, the parity bit value is 1.

On receiving a frame, the receiver counts the number of 1s. For even parity check, if the count of 1s is even, the frame is accepted; otherwise it is rejected. The same rule applies for odd parity check. Parity check is suitable for single-bit error detection only.

Checksum

In this error detection scheme, the following procedure is applied:

  • Data is divided into fixed-sized frames or segments.

  • The sender adds the segments using 1's complement arithmetic to get the sum, then complements the sum to get the checksum and sends it along with the data frames.

  • The receiver adds the incoming segments along with the checksum using 1's complement arithmetic to get the sum and then complements it.

  • If the result is zero, the received frames are accepted; otherwise they are discarded.

Cyclic Redundancy Check (CRC)

Cyclic Redundancy Check (CRC) involves binary division of the data bits being sent by a predetermined divisor agreed upon by the communicating systems. The divisor is generated using polynomials.

  • The sender performs binary division of the data segment by the divisor and appends the remainder (called CRC bits) to the end of the data segment. This makes the resulting data unit exactly divisible by the divisor.

  • The receiver divides the incoming data unit by the divisor. If there is no remainder, the data unit is assumed to be correct and is accepted. Otherwise, the data is understood to be corrupted and is rejected.

Comparison of Error Detection Methods

Method Error Detection Capability Overhead Complexity
Parity Check Single-bit errors only 1 bit Low
Checksum Multiple-bit errors (limited) 16-32 bits Medium
CRC Burst and multiple-bit errors 8-32 bits High

Conclusion

Error-detecting codes are essential for reliable data transmission over noisy communication channels. While parity checks offer simple single-bit error detection, CRC provides the most robust error detection capability for modern networks.

Updated on: 2026-03-16T23:36:12+05:30

27K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements