π€ What is an Error in Data Communication?
When data is transmitted over a network, it travels as signals (electrical, light, or radio).
During transmission, data may get changed unintentionally.
π This unwanted change in data is called an Error.
π§ Simple Example
Sender sends:
π 1011001
Receiver receives:
π 1011101 β (one bit changed)
π This is a data transmission error.
β οΈ Why Do Errors Occur?
Errors can occur due to:
π Electrical noise
π‘ Signal interference
π§οΈ Weather conditions
π Weak signals
π₯ Hardware faults
π Errors are unavoidable, but they can be detected and corrected.
π― Why Error Detection & Correction is Needed
Without error control:
Wrong data is accepted β
System crashes β
Financial loss β
With error control:
Errors are detected βοΈ
Data is corrected or retransmitted βοΈ
Communication becomes reliable βοΈ
π§ Two Main Concepts
There are two important approaches:
1οΈβ£ Error Detection
2οΈβ£ Error Correction
Letβs understand both clearly π
π Error Detection
π§ What is Error Detection?
Error detection is the process of identifying whether data is corrupted or not during transmission.
π It detects the presence of error, but does not fix it.
π§ What Happens After Detection?
Receiver informs sender
Sender retransmits the data
π Used where retransmission is possible.
π οΈ Common Error Detection Techniques
1οΈβ£ Parity Check
2οΈβ£ Checksum
3οΈβ£ Cyclic Redundancy Check (CRC)
π’ 1. Parity Check

π§ What is Parity Bit?
A parity bit is an extra bit added to data to make:
Number of 1s even (Even parity)
Number of 1s odd (Odd parity)
π§ Example (Even Parity)
Data: 1011001 β number of 1s = 4
Parity bit added: 0
Transmitted: 10110010
β Advantages
Simple
Low overhead
β Disadvantages
Detects only single-bit errors
Cannot detect multiple-bit errors reliably
β 2. Checksum

π§ What is Checksum?
Checksum is a value calculated by:
Adding data bits
Sending the result with data
π Receiver recalculates checksum and compares.
π§ Example
Sender:
Data blocks added β checksum generated
Receiver:
Adds received blocks
If result matches β no error
Else β error detected β
β Advantages
Better than parity
Simple to implement
β Disadvantages
Not 100% reliable
Some errors may go undetected
π Used in TCP, UDP.
π 3. Cyclic Redundancy Check (CRC)

π§ What is CRC?
CRC is a powerful error detection technique based on binary division.
π A fixed binary number called generator polynomial is used.
π§ How CRC Works (Simple Steps)
1οΈβ£ Data is treated as binary number
2οΈβ£ Divided by generator polynomial
3οΈβ£ Remainder is calculated
4οΈβ£ Remainder is appended to data
5οΈβ£ Receiver repeats division
6οΈβ£ If remainder = 0 β no error βοΈ
β Advantages
Detects burst errors
Very reliable
Widely used
β Disadvantages
More complex
Computational overhead
π Used in Ethernet, HDLC.
π οΈ Error Correction
π§ What is Error Correction?
Error correction not only detects errors, but also fixes them at the receiver side.
π No need to retransmit data.
π§ Types of Error Correction
1οΈβ£ Forward Error Correction (FEC)
2οΈβ£ Automatic Repeat reQuest (ARQ)
π 1. Forward Error Correction (FEC)
π§ Explanation
Extra bits are added so receiver can:
Detect error
Correct error automatically
π Used where retransmission is not possible.
π§ Example
Satellite communication π°οΈ
Real-time audio/video π₯
β Drawback
Adds more redundancy
Increases bandwidth usage
π 2. Automatic Repeat reQuest (ARQ)
π§ Explanation
Error detected
Receiver requests retransmission
Sender resends data
π Most commonly used method.
π§© Types of ARQ
Stop-and-Wait ARQ
Go-Back-N ARQ
Selective Repeat ARQ
π Weβll study these in Flow Control topic.
π Error Detection vs Error Correction
Feature | Error Detection | Error Correction |
|---|---|---|
Purpose | Detect error | Detect & fix |
Retransmission | Required | Not required |
Complexity | Low | High |
Overhead | Less | More |
π§ Where Are These Techniques Used?
Parity β Simple systems
Checksum β TCP / UDP
CRC β Ethernet
FEC β Satellite
ARQ β Data Link & Transport layers
β One-Line Summary
πΉ Error detection finds corrupted data, while error correction fixes errors to ensure reliable communication.