Error Detection and Correction
Error Detection and Correction
Error Detection and Correction
Background Information
01000110 01000010
Burst errors does not necessarily mean that the errors occur
in consecutive bits, the length of the burst is measured from
the first corrupted bit to the last corrupted bit. Some bits in
between may not have been corrupted.
Burst error
• Burst error is most likely to happen in serial transmission
since the duration of the error cause is normally longer
than the duration of a bit.
• The number of bits affected depends on the data rate and
duration of error cause.
Error detection
• Error detection is the decision on whether the received
data is correct or not without having a copy of the original
message.
• Error detection uses the concept of redundancy, which
means adding extra bits for detecting errors at the
destination.
Redundancy
Data bits
1001101010000001
Accept
Extra bits Error
Generator checking
Reject
1001
Redundancy check
Sender Receiver
1001 1001101010000001
Data + redundancy bits=codeword
Three types of redundancy checks are used
in data communications
Parity or Vertical Redundancy Check
(VRC)
• Parity check is the process of adding one extra bit to a
character bits for error checking and correction.
• The extra bit (called the parity bit), is selected to make the total
number of 1s in the codeword is even or odd.
• Even parity (ensures that a codeword has an even number of
1’s) and odd parity (ensures that there are an odd number of
1’s in the codeword)
Example: even parity Example: odd parity
1000000 → 11000000 1000000 → 01000000
1111101 → 01111101 1111101 → 11111101
1001001 → 11001001 1001001 → 01001001
Vertical Redundancy Check
VRC
01010110 01010100
(Even) (Odd) (Mismatch → error)
01010110 01010101
(Even) (Even) (match → no error) ??
0 1 1 1 1
1 0 0 0 1
0 0 0 1 1
Direction of unit transfer
1 1 1 1 0
0 0 1 1 0
1 1 1 0 1 VRC
0 0 0 1 1
1 1 0 1 1
LRC verifies the accuracy of stored and transmitted data using
parity bits. It is a redundancy check applied to a parallel group of
bit streams. The data to be transmitted is divided into
transmission blocks into which additional check data is inserted.
In this redundant bit called parity bit In this redundant row of bits is added to the whole
2.
is added to each data unit. block.
3. VRC can detect single bit errors. LRC can detect burst errors.
100
Division
101
1011 1001011000
-1011 Drop next binary 1 then divide
by 1 because the number of
100 dividend bits are equal to the
-000 divisor bits, multiply the binary 1
by divisor, then subtract
1001
-1011
10
Division
1010
1011 1001011000
-1011 Drop next binary 1 then divide
by 0 because the number of
100 dividend bits are less than the
-000 divisor bits. There is no need to
multiply by 0 (remainder remains
1001 the same) then subtract.
-1011
101
Division
10101
1011 1001011000
-1011 Drop next binary 0 then divide
by 1 because the number of
100 dividend bits are equal the
-000 divisor bits then multiply the 1
obtained by the divisor then
1001 subtract
-1011
1010
-1011
1
Division
1010100
1011 1001011000
-1011 Drop next binary 0 then divide
by 0 because the number of
100 dividend bits are less than the
-000 divisor bits, then drop 0 and
divide by 0. This brings the
1001 division to an end
-1011
1010
-1011
100
Division
After the division, the following parts of the operation
results
Divisor
1010100 Quotient