Data Communications
Lecture-07
Error Detection and Correction
Course Instructor : Hussain Shah
Department: Shaikh Zayed Islamic Centre
University Of Peshawar.
Hussain Shah 09/23/25
Error correction and
detection is a Data Link
layer function
Hussain Shah 09/23/25
Note
• Data can be corrupted during
transmission.
• Some applications require that
errors be detected and corrected.
• Errors: Unpredictable changes due to
interference
Hussain Shah 09/23/25
Types of Errors
Hussain Shah 09/23/25
Types of error
Single Bit Error
Burst Error
Hussain Shah 09/23/25
Note
• In a single-bit error, only
1 bit in the data unit has
changed.
Less likely to occur. In 1Mbps, 1 bit is of
1µs(micro second). so interference for
such small time is less likely
Hussain Shah 09/23/25
Figure 10.1 Single-bit error
Hussain Shah 09/23/25
Note
A burst error means that 2 or
more bits in the data unit
have changed.
Hussain Shah 09/23/25
Figure 10.2 Burst error of length 8
Hussain Shah 09/23/25
Redundancy
To detect or correct errors, we need to
send extra (redundant) bits with data.
Central concept
extra bits added to data
Sender adds them and receiver removes
Used for detecting and corrections errors
Hussain Shah 09/23/25
Figure 5-4
Redundancy
Hussain Shah 09/23/25
Send message twice
Compare bit by bit. If same no error
Very slow
Types of redundancy
Vertical redundancy check (VRC)
Longitudinal Redundancy Check (LRC)
Cyclic Redundancy Check (CRC)
Check Sum
Hussain Shah 09/23/25
Error detection vs. Correction
Detection
Justinterested in knowing if there
is any error or not
Correction
Interested in knowing about exact
number of bits that are corrupted
and their location in the message.
Hussain Shah 09/23/25
Forward error correction Vs.
Retransmission
Forward error correction
Receiver guess the corrects
message from the redundant bits.
Retransmission
Receiver just detects the error
and ask sender to retransmit the
message again
Hussain Shah 09/23/25
Types of redundancy
Vertical redundancy check (VRC)
Longitudinal Redundancy Check (LRC)
Cyclic Redundancy Check (CRC)
Check Sum
Hussain Shah 09/23/25
1) Vertical redundancy check
(VRC)
Most common and least expensive
Also called parity checking
A redundant bit, called parity bit, is added
to the every dataword so that the number
of resulting one becomes even
Hussain Shah 09/23/25
Performance
Only 1 bit error can be detected
Can detect burst errors if the total number of
changed bits is Odd
Hussain Shah 09/23/25
Figure 5-6
Even Parity VRC Concept
O)1100001
1) 1101001 1 bit change
2) 1000101 2 bit change not find
Hussain Shah 09/23/25
Longitudinal Redundancy
Check (LRC)
Data is organized in table form in rows and
columns
Parity bit is calculated for every column
and and a new row is added at the end
Hussain Shah 09/23/25
Figure 5-7
LRC
Hussain Shah 09/23/25
Performance
Can detect burst error more often
LRC of ‘n ‘ bits can detect upto n bits burst
error
One pattern of error can’t be detected
If two bits are changed in a row and in some
other row error occurs at the same position
(column)
00110011
00110011
Hussain Shah 09/23/25
Cyclic Redundancy Check
(CRC)
For a block of k bits transmitter generates
n bit sequence
Transmit k+n bits which is exactly divisible
by some number
Receiver divides frame by that number
If no remainder, assume no error
Hussain Shah 09/23/25
Figure 5-8
CRC Generator and Checker
Hussain Shah 09/23/25
Figure 10.15 Division in CRC encoder
Append
0,s (1 bit
less than
divisor)
Hussain Shah 09/23/25
Continue….
Hussain Shah 09/23/25
CRC
Powerful technique
The sequence of redundant bits is called
CRC / CRC Remainder
CRC when added to the data unit, the
entire data unit becomes divisible by a
second predetermined number.
At destination the data unit is divided by
the same number.
If no remainder, no Error
Hussain Shah 09/23/25
Assignment : Check Sum
Last Date:20/02/2023
Hussain Shah 09/23/25