You are on page 1of 33

# ERROR DETECTION AND

CORRECTION
ERROR DETECTION AND
CORRECTION

Types of Errors
Detection
Correction
Data can be corrupted during transmission.
For reliable communication, errors must be
detected and corrected.
Types of Error

Single-Bit Error

Burst Error
Single-Bit Error
Note:

## In a single-bit error, only one bit in the

data unit has changed.
Burst Error
Note:

## A burst error means that 2 or more bits

in the data unit have changed.
Error Detection
Redundancy

Parity Check

Checksum
Note:

## Error detection uses the concept of

extra bits for detecting errors at the
destination.
Redundancy
Even-parity concept
VERTICAL REDUNDANCY CHECK (VRC)
Note:

## In parity check, a parity bit is added to

every data unit so that the total
number of 1s is even
(or odd for odd-parity).
Example 1
Supposethesenderwantstosendthewordworld.In
ASCIIthefivecharactersarecodedas
1110111 1101111 1110010 1101100 1100100
Thefollowingshowstheactualbitssent
1110111011011110111001001101100011001001
Example 2
11101110110111101110010011011000
11001001
withevennumbers(6,6,4,4,4).Thedataareaccepted.
Example 3
NowsupposethewordworldinExample1iscorrupted
duringtransmission.
11111110110111101110110011011000
11001001
forretransmission.
Note:

## Simple parity check can detect all

single-bit errors. It can detect burst
errors only if the total number of
errors in each data unit is odd.
LONGITUDINAL REDUNDANCY CHECK
LRC

10101001
00111001
11011101
11100111

LRC 10101010

## Data plus LRC

Two-dimensional parity
CRC generator and checker
Data unit and checksum

Sender
Note:

## The sender follows these steps:

The unit is divided into k sections, each of n bits.

Note:

## The receiver follows these steps:

The unit is divided into k sections, each of n bits.

## If the result is zero, the data are accepted:

otherwise, rejected.
Example 4
Supposethefollowingblockof16bitsistobesentusinga
checksumof8bits.
1010100100111001
10101001
00111001

Sum 11100010
Checksum00011101
Thepatternsentis101010010011100100011101
Example 5
andthereisnoerror.
101010010011100100011101
aftercomplementing,isall0sandshowsthatthereisnoerror.
10101001
00111001
00011101
Sum 11111111
Complement 00000000meansthatthepatternisOK.
Example 6
Nowsupposethereisabursterroroflength5thataffects4bits.
101011111111100100011101
10101111
11111001
00011101
PartialSum111000101
Carry 1
Sum 11000110
Complement00111001thepatterniscorrupted.
Correction

## Stop and wait

Go Back N

Sliding Window

Hamming Code
Hamming Code
Data and redundancy bits

## Number of Number of Total

data bits redundancy bits bits
m r m+r
1 2 3
2 3 5
3 3 6

4 3 7

5 4 9

6 4 10

7 4 11

2 m r 1
r
Positions of redundancy bits in Hamming code

3 2 1 0
2 ,2 ,2 ,2
Redundancy bits calculation
Example of redundancy bit calculation
Error detection using Hamming code
Burst error correction example