Home » Computer Network » Explain different error detection techniques.

Explain different error detection techniques.

Last updated:

Support this post with a reaction:

4,477 views

Introduction

Data communication is an important part of computer networks. It allows two or more devices to exchange information through a communication medium, such as cables, optical fibers, or wireless signals.

During data transmission, information travels from a sender to a receiver in the form of binary bits (0s and 1s). However, data may sometimes get changed while travelling from one device to another. These changes can happen because of electrical interference, noise, signal distortion, or problems in the communication channel.

For example, suppose a sender transmits the binary data 1011001. Due to transmission errors, the receiver may receive 1010001. In this case, one bit has changed from 1 to 0.

If the receiver does not identify this change, it may process incorrect information. To avoid this problem, computer networks use error detection techniques.

Error detection techniques help the receiver identify whether the transmitted data has been changed during communication. They add extra bits to the original data so that the receiver can check whether the received information is correct or contains errors.

These techniques play an important role in maintaining data accuracy and reliable communication between devices.

Error Detection

Error detection is a process used in data communication to identify whether any errors have occurred in the transmitted data during its journey from the sender to the receiver.

In this process, the sender adds some extra bits, known as redundant bits, to the original data. These additional bits are calculated using a particular error detection method.

When the receiver gets the data, it performs the same calculation and compares the result with the received redundant bits. If the results do not match, the receiver identifies that an error has occurred during transmission.

Error detection does not necessarily correct the damaged data. Its main purpose is to identify errors so that appropriate action can be taken, such as requesting retransmission of the data.

Example:

Suppose a sender wants to transmit the following binary data:

10110101

Before sending the data, the sender calculates additional checking bits and attaches them to the original data. The receiver uses these bits to verify the received information.

If the checking process identifies a mismatch, the receiver knows that the transmitted data may contain an error.

Importance of Error Detection in Computer Networks

Error detection is necessary because data can become corrupted while travelling through a communication channel. Without error detection, the receiver may accept incorrect information as valid data.

The following points explain why error detection is important:

1. Maintains Data Accuracy: It helps identify changes in transmitted data and ensures that incorrect information is not accepted without verification.

2. Improves Communication Reliability: It helps communication systems identify transmission problems and take suitable action.

3. Detects Transmission Errors: It identifies errors caused by noise, interference, signal distortion, and other communication problems.

4. Supports Data Retransmission: When an error is detected, the receiver can request the sender to transmit the data again.

5. Reduces Incorrect Data Processing: It prevents corrupted information from being processed as if it were correct.

6. Supports Reliable Network Communication: It is used in different communication protocols to improve the reliability of data exchange.

Types of Errors in Data Transmission

Before understanding different error detection techniques, it is important to know the common types of errors that can occur during data transmission.

An error occurs when the data received by the receiver is different from the data originally sent by the sender.

There are two major types of transmission errors.

1. Single-Bit Error

A single-bit error occurs when only one bit in the transmitted data changes from 0 to 1 or from 1 to 0.

In this type of error, only one bit is affected, while all the remaining bits stay unchanged.

Example:

  • Original data: 10110101
  • Received data: 10100101

Here, one bit has changed from 1 to 0. Therefore, it is called a single-bit error.

Single-bit errors can occur due to temporary disturbances or noise in the communication channel.

2. Burst Error

A burst error occurs when two or more bits in a data unit are changed during transmission.

The affected bits do not necessarily need to be next to each other. The burst length is measured from the first corrupted bit to the last corrupted bit.

Example:

  • Original data: 10110101
  • Received data: 11000111

Here, multiple bits have changed during transmission. Therefore, it is an example of a burst error.

Burst errors are common in communication systems because noise or interference can affect several bits within a short period.

Different Error Detection Techniques

There are several error detection techniques used in computer networks to identify errors during data transmission. Each technique uses additional information, called redundant bits, to check whether the received data is correct.

The most commonly used techniques are:

  1. Vertical Redundancy Check (VRC)
  2. Longitudinal Redundancy Check (LRC)
  3. Two-Dimensional Parity Check
  4. Checksum
  5. Cyclic Redundancy Check (CRC

1. Vertical Redundancy Check (VRC)

Vertical Redundancy Check (VRC) is one of the simplest and most commonly understood error detection techniques. It is also known as a Parity Check or Single-Bit Parity Check.

In this method, the sender adds one extra bit, called a parity bit, to each group of data bits. This parity bit is added to make the total number of 1s either even or odd.

VRC uses two types of parity:

a) Even Parity

In even parity, the sender adds a parity bit in such a way that the total number of 1s in the transmitted data becomes even.

For example:

Suppose the original data is:

1011001

The number of 1s in this data is 4, which is already even.

Therefore, the parity bit is 0.

  • Original data: 1011001
  • Parity bit: 0
  • Transmitted data: 10110010

If the original data contains an odd number of 1s, the sender adds 1 to make the total number of 1s even.

b) Odd Parity

In odd parity, the sender adds a parity bit in such a way that the total number of 1s in the transmitted data becomes odd.

For example:

Suppose the original data is:

1011001

The number of 1s is 4, which is even.

To make the total number of 1s odd, the sender adds a parity bit of 1.

  • Original data: 1011001
  • Parity bit: 1
  • Transmitted data: 10110011

Working of VRC

The working of VRC involves the following steps:

  1. The sender takes the original binary data.
  2. It counts the number of 1s in the data.
  3. Based on the selected parity method, it adds one extra parity bit.
  4. The sender transmits the data along with the parity bit.
  5. The receiver counts the number of 1s in the received data.
  6. If the parity condition is not satisfied, the receiver identifies that an error has occurred.

Advantages of VRC

  • It is simple and easy to implement.
  • It requires only one additional bit for each data unit.
  • It can detect all single-bit errors.
  • It requires less processing power.

Disadvantages of VRC

  • It cannot detect errors when an even number of bits are changed.
  • It cannot identify the exact position of the error.
  • It is not suitable for detecting all types of burst errors.

Applications of VRC

VRC is used in basic communication systems, serial communication, and simple data transmission environments where a basic error checking mechanism is sufficient.

2. Longitudinal Redundancy Check (LRC)

Longitudinal Redundancy Check (LRC) is an error detection technique in which data is arranged in the form of rows and columns. It calculates parity bits for each column and adds an additional row of parity bits to the original data.

Unlike VRC, which checks individual groups of bits, LRC checks data across multiple groups of bits.

In this technique, the sender divides the data into several rows. It then calculates the parity bit for each column using either even parity or odd parity.

The calculated parity bits are placed in an additional row called the LRC row.

Example of LRC

Suppose the sender wants to transmit the following four-bit data groups:

DataBits
Row 11 0 1 1
Row 20 1 1 0
Row 31 1 0 0
Row 41 0 0 1

Using even parity, the sender calculates the parity bit for each column.

The resulting arrangement is:

DataBit 1Bit 2Bit 3Bit 4
Row 11011
Row 20110
Row 31100
Row 41001
LRC1000

The LRC row is calculated by counting the number of 1s in each column and adding a parity bit to make the total even.

For example:

  • Column 1 contains three 1s, so the parity bit is 1.
  • Column 2 contains two 1s, so the parity bit is 0.
  • Column 3 contains two 1s, so the parity bit is 0.
  • Column 4 contains two 1s, so the parity bit is 0.

Therefore, the LRC bits are 1000.

Working of LRC

  1. The sender divides the data into multiple rows.
  2. It arranges the data bits into columns.
  3. It calculates the parity bit for each column.
  4. The calculated parity bits are added as an additional row.
  5. The sender transmits the original data along with the LRC bits.
  6. The receiver performs the same parity calculation.
  7. If any column does not satisfy the expected parity condition, the receiver identifies an error.

Advantages of LRC

  • It can detect many multiple-bit errors.
  • It is more effective than a simple single-bit parity check.
  • It can detect many burst errors.
  • It is relatively easy to implement.

Disadvantages of LRC

  • It requires additional parity bits.
  • It cannot detect every possible error pattern.
  • It may fail when multiple errors cancel each other’s parity effects.

Applications of LRC

LRC is used in some data communication systems and storage-related applications where data is organized into blocks and additional parity information is useful.

3. Two-Dimensional Parity Check

Two-Dimensional Parity Check is an error detection technique that combines the concepts of Vertical Redundancy Check (VRC) and Longitudinal Redundancy Check (LRC).

In this method, data bits are arranged in rows and columns. The sender calculates parity bits for both rows and columns.

The parity bits are added at the end of each row and as an additional row at the bottom of the data block.

This technique provides better error detection than a simple parity check because it checks the data in two directions.

Example of Two-Dimensional Parity Check

Consider the following binary data arranged in four rows:

DataBit 1Bit 2Bit 3Bit 4Row Parity
Row 110111
Row 201100
Row 311000
Row 410010
Column Parity10001

Here, even parity is used.

The sender calculates the parity bit for each row and column. The final row contains the column parity bits, and the last column contains the row parity bits.

Working of Two-Dimensional Parity Check

  1. The sender arranges the data bits into rows and columns.
  2. It calculates a parity bit for each row.
  3. It calculates another parity bit for each column.
  4. The parity bits are added to the original data.
  5. The complete data block is transmitted to the receiver.
  6. The receiver checks the parity of every row and column.
  7. If the parity of a particular row and column is incorrect, their intersection helps identify the position of a single-bit error.

Advantages of Two-Dimensional Parity Check

  • It provides better error detection than a simple parity check.
  • It can detect many multiple-bit errors.
  • It can detect all single-bit errors.
  • It can locate and correct a single-bit error under the standard assumptions of the method.

Disadvantages of Two-Dimensional Parity Check

  • It requires more redundant bits than a simple parity check.
  • It increases the amount of transmitted data.
  • It cannot detect every possible combination of multiple-bit errors.
  • It requires additional calculations at the sender and receiver.

Applications of Two-Dimensional Parity Check

It is used in communication systems and data storage environments where detecting errors in blocks of data is important.

4. Checksum

Checksum is an error detection technique in which the sender divides the data into equal-sized blocks and performs arithmetic addition on those blocks to generate a checksum value.

The checksum is then transmitted along with the original data. At the receiver’s end, the same calculation is performed to verify whether the received data contains errors.

Checksum is widely used in network communication protocols to identify errors in transmitted information.

Working of Checksum

The checksum technique works through the following steps:

  1. The sender divides the original data into equal-sized blocks, commonly 16-bit words in the Internet checksum.
  2. It adds all the data blocks using one’s complement addition.
  3. If an extra carry is generated, it is added back to the least significant bit.
  4. The sender takes the one’s complement of the final sum to generate the checksum.
  5. The checksum is attached to the original data and transmitted to the receiver.
  6. The receiver adds all the received data blocks along with the checksum.
  7. If the final result is all 1s, no error is detected. Otherwise, the receiver identifies an error.

Example of Checksum

Suppose the sender wants to transmit two 8-bit data blocks:

  • Data block 1: 10011001
  • Data block 2: 11001010

Step 1: Add the two data blocks.

  10011001
+ 11001010
----------
 101100011

The result contains 9 bits because an extra carry is generated.

Step 2: Add the carry to the remaining 8 bits.

  01100011
+ 00000001
----------
  01100100

Step 3: Calculate the one’s complement.

Change every 0 into 1 and every 1 into 0.

Sum:       01100100
Checksum:  10011011

Therefore, the checksum is 10011011.

Step 4: Transmit the data.

The sender transmits the two original data blocks along with the checksum.

Step 5: Verify at the receiver.

The receiver adds both data blocks and the checksum. If the final result is 11111111, no error is detected.

Advantages of Checksum

  • It is simple to understand and implement.
  • It requires relatively little processing power.
  • It is useful for detecting many common transmission errors.
  • It is used in several network communication protocols.

Disadvantages of Checksum

  • It may fail to detect certain combinations of errors.
  • It is generally less effective than CRC for detecting burst errors.
  • It does not identify the exact position of an error.
  • It cannot correct corrupted data by itself.

Applications of Checksum

Checksum is used in network protocols such as:

  • Internet Protocol (IPv4 header checksum).
  • Transmission Control Protocol (TCP).
  • User Datagram Protocol (UDP).

5. Cyclic Redundancy Check (CRC)

Cyclic Redundancy Check (CRC) is a powerful error detection technique used to identify errors in digital data during transmission or storage.

It uses binary division to calculate a remainder, which is added to the original data before transmission.

Unlike the checksum method, which uses arithmetic addition, CRC uses modulo-2 binary division. In this division, XOR (Exclusive OR) operation is used instead of normal subtraction.

CRC is particularly effective at detecting burst errors and is widely used in modern computer networks.

Working of CRC

The CRC technique works through the following steps:

  1. The sender takes the original binary data.
  2. It selects a predefined binary pattern called the generator polynomial.
  3. The sender appends zeros to the original data. The number of zeros is equal to the degree of the generator polynomial.
  4. It performs modulo-2 binary division using XOR operations.
  5. The remainder obtained from the division is called the CRC value.
  6. The sender replaces the appended zeros with the calculated remainder.
  7. The complete data, including the CRC bits, is transmitted to the receiver.
  8. The receiver divides the received data by the same generator polynomial.
  9. If the remainder is zero, no error is detected. If the remainder is non-zero, an error is detected.

Example of CRC

Suppose the original data is:

1101

And the generator polynomial is:

1011

Step 1: Append zeros to the original data.

The generator contains 4 bits, so its degree is 3. Therefore, append three zeros to the original data.

Original data: 1101
After adding zeros: 1101000

Step 2: Perform modulo-2 binary division.

Divide 1101000 by 1011 using XOR operations.

The remainder obtained is:

001

Step 3: Generate the transmitted data.

Replace the three appended zeros with the calculated remainder.

Original data:  1101
CRC remainder:  001
Transmitted:    1101001

Step 4: Verify at the receiver.

The receiver divides 1101001 by the same generator 1011.

  • If the remainder is 000, no error is detected.
  • If the remainder is non-zero, an error is detected.

Advantages of CRC

  • It provides strong error detection capabilities.
  • It is highly effective in detecting burst errors.
  • It can detect many types of multiple-bit errors.
  • It is suitable for high-speed data communication.
  • It can be implemented efficiently using hardware or software.

Disadvantages of CRC

  • It is more complex than a simple parity check.
  • It requires additional processing for binary division.
  • It cannot correct errors by itself.
  • Its effectiveness depends on the selected generator polynomial.

Applications of CRC

CRC is widely used in:

  • Ethernet networks.
  • Wi-Fi communication.
  • Data storage devices.
  • File transfer systems.
  • Digital communication protocols.

Technical reference: CRC-based frame checking is commonly used in link-layer technologies such as Ethernet. Learn CSIT+1

Comparison of Different Error Detection Techniques

Different error detection techniques are used depending on the type of communication system, the amount of data being transmitted, and the level of reliability required.

The following table explains the major differences between these techniques.

TechniqueWorking principleMain advantageMain limitation
VRCAdds one parity bit to each data unitSimple and easy to implementCannot detect an even number of bit errors
LRCCalculates parity for each columnDetects many burst errorsCannot detect all error combinations
Two-Dimensional ParityChecks parity in both rows and columnsCan locate a single-bit errorRequires additional parity bits
ChecksumAdds data blocks and calculates a complementEasy to calculateMay miss certain error patterns
CRCUses modulo-2 binary divisionHighly effective error detectionMore complex than parity checking

Advantages of Error Detection Techniques

Error detection techniques provide several benefits in computer networks. Some of the important advantages are explained below.

1. Improves Data Reliability: These techniques help identify whether the received information has been corrupted during transmission.

2. Maintains Data Integrity: They help ensure that the data received by the destination matches the data sent by the sender.

3. Identifies Transmission Errors: They detect errors caused by noise, electrical interference, and other communication problems.

4. Supports Reliable Communication: Error detection allows network devices to identify corrupted data and take appropriate action.

5. Reduces Data Processing Errors: It helps prevent incorrect information from being accepted without verification.

6. Supports Retransmission: When an error is detected, the receiver can request the sender to retransmit the damaged data.

Limitations of Error Detection Techniques

Although error detection techniques improve communication reliability, they also have certain limitations.

1. Additional Bits: These techniques require extra bits along with the original data, increasing the total amount of transmitted information.

2. Processing Requirements: Some techniques, such as CRC, require additional calculations to generate and verify error detection values.

3. Cannot Correct Errors: Most error detection techniques only identify errors. They do not automatically restore the original data.

4. Possibility of Undetected Errors: Some error patterns may not be detected by certain techniques. Therefore, no error detection method guarantees the detection of every possible error.

5. Communication Overhead: Adding redundant bits increases the size of transmitted data and introduces some additional overhead.

Difference Between Error Detection and Error Correction

Error detection and error correction are two important concepts in computer networks. Both are used to handle errors that occur during data transmission. However, their purposes are different.

Error Detection: Error detection is the process of identifying whether transmitted data contains errors. It informs the receiver that the received information may be incorrect. The receiver may request the sender to retransmit the data.

Error Correction: Error correction is the process of identifying and correcting errors in received data so that the original information can be recovered. Some error correction techniques can correct errors without requesting retransmission.

The following table explains the differences between error detection and error correction.

Error DetectionError Correction
Identifies the presence of errors.Identifies and corrects errors.
Usually requires fewer redundant bits.Generally requires more redundant information.
Does not correct corrupted data by itself.Can recover the original data within its correction capability.
May require retransmission.Can correct certain errors without retransmission.
Examples: Parity Check, Checksum, CRC.Examples: Hamming Code, Reed-Solomon Code.

Note: Hamming Code is primarily an error correction technique, although suitable versions can also provide error detection.

Applications of Error Detection Techniques

Error detection techniques are used in different areas of computer networks and digital communication systems.

Some important applications include:

1. Computer Networks: Error detection is used to identify corrupted frames and packets during communication between network devices.

2. Ethernet Communication: CRC is used in Ethernet frames to detect transmission errors.

3. Wireless Communication: Error detection helps identify corrupted information transmitted through wireless networks.

4. Internet Communication: Checksums are used in protocols such as IPv4, TCP, and UDP to verify data integrity.

5. Data Storage: Error detection methods help identify corruption in stored information and data transfer operations.

6. File Transfer: Error checking helps verify whether files have been transferred without corruption.

7. Digital Communication Systems: These techniques help maintain the accuracy of information exchanged between digital devices.