lecture 22
DESCRIPTION
TRANSCRIPT
DATA COMMUNICATIONS & NETWORKING
LECTURE-22
Course Instructor : Sehrish Rafiq
Department Of Computer Science
University Of Peshawar
ERROR CORRECTION
ERROR CORRECTION
The two most common error correction ways are
Error correction by retransmission In this technique when an error is
discovered,the receiver can have the sender retransmit the entire data unit.
Forward error correction In forward error correction a receiver can use
an error-correcting code, which automatically corrects certain errors.
ERROR CORRECTION
Error-correcting codes however are more sophisticated than error detection codes and require more redundancy bits.
A single additional bit can detect single bit errors in any sequence of bits because it must distinguish only between two conditions :error or no error.
ERROR CORRECTION
However to correct a single bit error in ASCII character, the error correction code must determine which of the seven bits have changed.
In this case we have to distinguish between eight different states :no error, error in position 1,error in position 2, and so on.
RELATIONSHIP BETWEEN DATA AND REDUNDANCY BITS
To calculate the number of redundancy bits r required to correct a given number of data bits m the following formula can be used:
2r >=m+r+1
RELATIONSHIP BETWEEN DATA AND REDUNDANCY BITS
Number ofdata bits
m
Number of redundancy bits
r
Total bits
m + r
11 2 3
22 3 5
33 3 6
44 3 7
55 4 9
66 4 10
77 4 11
HAMMING CODE
The hamming code can be applied to data units of any length and uses the relationship between data and redundancy bits discussed above.
HAMMING CODE
In Hamming code, each r bit is the parity bit for one combination of data bits as shown below:
r1: bits 1,3,5,7,9,11 r2: bits 2,3,6,7,10,11 r4: bits 4,5,6,7 r8: bits 8,9,10,11 Note: In the sequence above each of the
original data bits is included in at least two sets while the r bits are included only once.
REDUNDANCY BIT CALCULATION
EXAMPLE OF REDUNDANCY BIT CALCULATION
ERROR DETECTION USING HAMMING CODE
BURST ERROR CORRECTION
Although the hamming code cannot correct a burst error directly, it is possible to rearrange the data and then apply the code.
Instead of sending all the bits in data unit together, we can organize N units in a column and then the first bit of each , followed by the second bit of each and so on.
BURST ERROR CORRECTION CONT…
In this way if an error of M bits occurs (M<N), then the error does not corrupt M bits of one single unit,it corrupts only one bit of a unit.
With the Hamming code we can correct the corrupted bit in each unit.
BURST ERROR CORRECTION EXAMPLE
THANKS!!!