Error Detection
In a computer network, data is constantly transmitted between devices such as
computers, smartphones, servers, routers, and IoT devices. While transmitting
data, various factors such as electrical noise, signal interference, hardware
failures, and transmission medium issues can alter the original information.
As a result, the data received by the destination may not be exactly the same
as the data sent by the source. This situation is known as a transmission
error.
Error Detection is the process of identifying whether transmitted data has
been corrupted during communication. It plays a vital role in maintaining
reliable and accurate communication across networks.
What is an Error?
1. Data Integrity
Ensures that data received is exactly the same as the data sent.
Example
In online banking, an incorrect transaction amount due to a transmission error
could cause financial losses.
2. System Reliability
Error detection improves the overall reliability and trustworthiness of
communication systems.
Example
Cloud services continuously verify transmitted data to prevent corruption.
3. Fault Identification
Helps identify faulty communication links, network devices, or transmission
media.
Example
Repeated errors on a specific network cable may indicate physical damage.
4. Efficient Communication
Prevents corrupted data from reaching higher protocol layers where it may
cause larger issues.
5. Enhanced Security
Error detection helps distinguish accidental corruption from malicious
modifications.
Types of Errors
Errors in data communication are generally classified into two categories:
- Single-Bit Error
- Burst Error
1. Single-Bit Error
A Single-Bit Error occurs when only one bit of a data unit changes.
Example
Original Data:
10110010
Received Data:
10100010
Only one bit changed from 1 to 0.
Characteristics
Only one bit is affected.
Easier to detect.
More common in parallel transmission systems.
Why It Happens
In parallel communication, multiple wires transmit bits simultaneously. If one
wire experiences noise, only one bit may become corrupted.
Real-World Example
Imagine eight lanes of traffic carrying cars simultaneously. If one lane
experiences a problem, only cars in that lane are affected.
2. Burst Error
A Burst Error occurs when two or more bits within a data unit are altered.
Example
Original Data:
11010110
Received Data:
10000111
Several bits have changed during transmission.
Characteristics
- Multiple bits are affected.
- Most common type of transmission error.
- More likely in serial communication systems.
Causes of Burst Errors
- Electrical interference
- Signal attenuation
- Synchronization problems
- Faulty hardware
- Wireless signal fading
Real-World Example
Imagine writing a sentence while someone shakes your hand continuously.
Several characters may become incorrect instead of just one.
Error Detection Techniques
Several methods are used to detect transmission errors.
The most commonly used techniques are:
- Single Parity Check
- Two-Dimensional Parity Check
- Checksum
- Cyclic Redundancy Check (CRC)
1. Single Parity Check
Single Parity Check is the simplest and most widely used error-detection
method.
A Parity Bit is added to the data before transmission.
The purpose of the parity bit is to make the total number of 1s either:
- Even (Even Parity)
- Odd (Odd Parity)
Most systems use Even Parity.
Example of Even Parity
Data:
1011001
Number of 1s = 4 (already even)
Parity Bit = 0
Transmitted Data:
10110010
Receiver Operation
The receiver counts the number of 1s again.
If parity does not match, an error is detected.
Advantages
- Very simple implementation
- Low overhead
- Fast processing
Limitations
- Detects only odd numbers of bit errors.
- Cannot detect many multiple-bit errors.
- Cannot identify the location of the error.
2. Two-Dimensional Parity Check
Two-Dimensional Parity improves the accuracy of simple parity checking.
Data bits are arranged in rows and columns.
Parity bits are calculated for:
- Every row
- Every column
Advantages
Better detection capability than single parity.
Can locate some single-bit errors.
Limitations
Some multiple-bit errors may remain undetected.
More overhead than simple parity.
3. Checksum
A Checksum is an error-detection mechanism widely used in network protocols
such as TCP, UDP, and IP.
The sender divides data into equal-sized segments and adds them together using
one's complement arithmetic.
The complement of the sum becomes the checksum value.
Sender Side Process
Suppose the data segments are:
1010
0101
1100
All segments are added together.
The complement of the final sum is generated.
Checksum = Complement(Sum)
The checksum is transmitted along with the data.
Receiver Side Process
The receiver:
Adds all received segments.
Includes the checksum.
Takes the complement.
If the result is:
0000
the data is considered correct.
Otherwise, an error is detected.
Advantages
- Simple implementation.
- Efficient for software-based systems.
- Used in many Internet protocols.
Limitations
- Less effective than CRC.
- Some complex error patterns may go undetected.
4. Cyclic Redundancy Check (CRC)
Cyclic Redundancy Check (CRC) is the most powerful and widely used
error-detection technique in modern communication networks.
CRC is used in:
- Ethernet
- Wi-Fi
- USB
- Storage devices
- Satellite communication
How CRC Works
CRC uses binary polynomial division.
A predefined binary number called a Generator Polynomial is shared between
sender and receiver.
Step 1
Append zeros to the original data.
Example:
Data = 11100
Divisor = 1001
Since divisor length is 4, append 3 zeros:
11100000
Step 2
Perform modulo-2 division.
The remainder obtained is called the CRC remainder.
Suppose the remainder is:
111
Step 3
Replace appended zeros with the CRC remainder.
Final transmitted data:
11100111
Step 4
Receiver Verification
The receiver performs the same modulo-2 division.
If the remainder equals:
000
Data is accepted.
Otherwise, an error is detected.
Error Detection Capability of CRC
CRC is extremely powerful because it can detect:
1. All Single-Bit Errors
Any change in one bit produces a non-zero remainder.
2. All Double-Bit Errors
Properly chosen generator polynomials detect all double-bit errors.
3. All Odd Number of Errors
Many CRC polynomials can detect any odd number of bit changes.
4. Burst Errors
CRC is especially effective at detecting burst errors.
It can detect:
- All burst errors shorter than the polynomial degree.
- Most longer burst errors.
This is why CRC is the preferred method in modern networks.
Example
Error Detection
A receiver notices corrupted data and requests retransmission.
This mechanism is commonly used in:
- Ethernet
- TCP networks
Error Correction
The receiver automatically reconstructs the correct data.
Used in:
- Satellite communication
- Deep-space communication
- Memory systems (ECC RAM)
Error Detection Across Network Layers
Different network layers use different error-detection mechanisms.
Physical Layer
Primarily responsible for signal transmission.
Limited error detection capability.
Examples:
- Signal loss detection
- Carrier detection
Data Link Layer
Main layer responsible for frame-level error detection.
Uses:
- Parity
- CRC
- Frame Check Sequence (FCS)
Examples:
- Ethernet
- PPP
- HDLC
Transport Layer
Provides end-to-end reliability.
TCP
Uses checksums to verify data integrity.
If an error is detected:
- Packet is discarded.
- Retransmission is requested.
Application Layer
Applications may perform additional validation.
Examples:
- MD5 Hash
- SHA Hash
- File integrity verification
Real-World Applications of Error Detection
Error detection is everywhere in modern technology.
1. Computer Networks
Ethernet frames contain a Frame Check Sequence (FCS) based on CRC.
This allows receivers to detect corrupted frames immediately.
2. Wireless Networks
Wi-Fi and mobile networks frequently experience interference.
Error detection combined with Automatic Repeat Request (ARQ) ensures reliable
communication.
3. Storage Devices
Hard disks, SSDs, and memory modules use error-detection techniques to prevent
data corruption.
Examples:
- ECC Memory
- CRC in Storage Systems
4. Banking Systems
Financial transactions require absolute accuracy.
Checksums and cryptographic hashes help ensure data integrity.
5. Satellite and Space Communication
Retransmission may take minutes or hours.
Therefore, advanced error detection and correction mechanisms are essential.
Examples include:
- Deep Space Networks
- Satellite Communication Systems
Advantages of Error Detection
Modern communication systems benefit greatly from error-detection mechanisms.
Improved Data Integrity
Ensures transmitted information remains accurate.
Higher Reliability
Makes communication systems more dependable.
Cost Effective
Most techniques require minimal additional resources.
High-Speed Compatibility
Methods such as CRC can operate efficiently in hardware at very high speeds.
Flexible Implementation
Different techniques can be selected according to application requirements.
Better Network Design
Error detection at multiple protocol layers significantly improves overall
communication reliability.