Unit 2 Topic 7 ERROR DETECTION AND CORRECTION
Unit 2 Topic 7 ERROR DETECTION AND CORRECTION
Unit 2 Topic 7 ERROR DETECTION AND CORRECTION
&
Correction
Introduction
Data can be corrupted during
transmission due to…
storms, accidents, sudden increase in
electricity and voltage / decrease in
signal power over distance
For reliable communication, errors
must be detected and corrected
What is an Error ?
• Whenever bits flow from one point to
another, they are subject to unpredictable
changes because of interference
• The interference can change the shape of
the signal, thus the bit value either from
“1” to “0” or from “0” to “1”
Two Types of Errors
• Single-Bit Errors : only one bit in the
data unit has changed
•Burst Errors of length ‘n’ : 2 or more
bits in the data unit have changed ( ‘n’ is
the distance between the FIRST and
LAST errors in the data block )
Single-Bit Errors
Burst Errors
Error Detection
Error Detection-General
• Sender transmits every data unit twice
• Receiver performs bit-by-bit comparison
between that two versions of data
• Any mismatch would indicate an error,
which needs error correction
• Advantage: very accurate
• Disadvantage: time consuming : requires
[ 2 x Transmission Time + Comparison Time ]
Error Detection- Redundancy
• Instead of repeating the entire data
stream, a shorter group of bits may be
appended to the end of each unit
• Called as “redundancy” because the extra
bits are redundant to the information
• Redundant information will be discarded
as soon as the accuracy of the information
has been determined
Error Detection- Redundancy
Error Detection-Redundancy
Data:
w o r l d
1110111 1101111 1110010 1101100 1100100
Sent As:
11101110 11011110 11100100 11011000 11001001
Corrupted:
11111110 11011110 11101100 11011000 11001001
Parity Check - Performance
• Can detect all single-bit errors
• Can also detect burst errors if the total
number of bits changed is odd (1,3,5,..)
• Cannot detect errors where the total
number of bits changed is even
• Detects about 50% of errors
Error Detection- 2D/LRC
• Adds an additional character (instead of a
bit)
• A block of bits is organized in a table
• The Parity Bit for each data unit is
calculated
• Then Parity Bit for each column is
calculated
• Parity Bits are attached to the data unit
Error Detection- LRC
Example:
Send the message “DATA” using ODD parity and LRC
• Retransmission
• Forward Error Correction
• Burst Error Correction
Error Correction-Retransmission
3 3 6
4 3 7
5 4 9
6 4 10
7 4 11
Relationship b/w data and redundancy bits
Error Correction-Hamming Code
• Hamming Code can be applied to data units of
any length and uses the relationship between data
and redundancy bits
r1: bits 1, 3, 5, 7, 9, 11
r2: bits 2, 3, 6, 7, 10, 11
r3: bits 4, 5, 6, 7
r4: bits 8, 9, 10, 11
Error Correction-Hamming Code