Error Detect
Error Detect
Error Detect
CORRECTION
&
ERROR
DETECTION 1
• Data can be corrupted during transmission.
For reliable communication, errors must be
detected and corrected.
2
TYPES OF ERRORS
• Single bit error :-
- Only one bit in the data unit has changed.
• Burst error :-
- It means that two or more bits in the data
unit has changed.
3
Single bit Error
0 changed to 1
0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0
Received Sent
Burst Error
Sent
0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1
Bits corrupted by Burst Error
0 1 0 1 1 1 0 1 0 1 0 0 0 0 1 1
Received
4
ERROR DETECTION
• Error detecting code is to include only enough
redundancy to allow the receiver to deduce
that an error occurred, but not which error,
and have it request a re-transmission.
5
Redundancy
• Instead of repeating the entire data stream, a
shorter group of bits may be appended to the
end of each unit. This technique is called
Redundancy because the extra bit are
redundant to the information. They are
discarded as soon as the accuracy of the
transmission has been determined.
6
7
• There are basically four types of redundancy
checks. They are:
8
ERROR DETECTION
9
VERTICAL
REDUNDANCY CHECK
It is also known as parity check
It is least expensive mechanism for error
detection
In this technique,the redundant bit called
parity bit is appended to every data unit
so that the total number of 1s in the unit
becomes even (including parity bit)
10
VERTICAL
REDUNDANCY CHECK
1100001 Data
Checking function
Receiver 1 VRC
Sender
11
VERTICAL REDUNDANCY CHECK
• Example :
12
VERTICAL REDUNDANCY CHECK
13
LONGITUDINAL REDUNDANCY CHECK(LRC)
14
LRC Example
11100111
11011101
00111001
10101001
LRC 10101010
15
LRC Example
16
Advantage :
-> LRC of n bits can easily detect burst
error of n bits.
Disadvantage :
-> If two bits in one data units are damaged and two
bits in exactly same position in another data unit
are also damaged , the LRC checker will not detect
the error.
17
CYCLIC REDUNDANCY CHECK (CRC)
The redundancy bits is used by CRC are derived by dividing the data
unit by a predetermined divisor. The remainder is the CRC.
18
• CRC generator and checker
REMAINDER CRC
Zero accept
N bits
Nonzero reject
Receiver Sender
19
Divisor
1 0 1 0 0 1 1 1
20
A polynomial should be selected according to
the following rule:-
1. It should not be divisible by x.
2. It should be divisible by x+1.
21
• Example :-
• The CRC generator at sender end :
111101
1101 100100 0 0 0
1101
1000
1101
1010
1101
1110
1101
0110
0000
1100
1101
001 22
The CRC checker at receiver end :
111101
1101 100100 0 0 1
1101
1000
1101
1010
1101
1110
1101
0110
0000
1101
1101
23
000
ERROR CORRECTION
• Error correcting code is to include enough redundant
information along with each block of data sent to
enable the receiver to deduce what the transmitted
character must have been.
24
• There are two types of Error Correcting
techniques :
25
HAMMING CODE
• It is a technique developed by R.W.Hamming.
• Hamming code can be applied to data units of
any length and uses the relationship between
data and redundancy bits. For eg.
26
• A 7 bit ASCII code requires 4 Redundancy bits
that can be added to the end of the data unit
or interspersed with the original data bits.
27
Positions of Redundancy Bits in Hamming Code
11 10 9 8 7 6 5 4 3 2 1
d d d r d d d r d r r
Redundancy Bits
28
• In the Hamming code, each r bit is the VRC bit for
one combination of data bits :
- r1 is the one combination of data bits.
- r2 is another combination of data bits.
and so on.
Data 1 0 0 1 1 0 1
Adding r1 1 0 0 1 1 0 1 1
Adding r2 1 0 0 1 1 0 1 0 1
Adding r4 1 0 0 1 1 0 0 1 0 1
Adding r8 1 0 0 1 1 1 0 0 1 0 1
11 10 9 8 7 6 5 4 3 2 1
30
Code : 1 0 0 1 1 1 0 0 1 0 1
1 0 0 1 1 1 0 0 1 0 1 Sent
Error
1 0 0 1 0 1 0 0 1 0 1 Received
31
1 0 0 1 0 1 0 0 1 0 1
11 10 9 8 7 6 5 4 3 2 1
1 0 0 1 0 1 0 0 1 0 1
11 10 9 8 7 6 5 4 3 2 1
1 0 0 1 0 1 0 0 1 0 1
11 10 9 8 7 6 5 4 3 2 1
1 0 0 1 0 1 0 0 1 0 1
11 10 9 8 7 6 5 4 3 2 1