Lecture 22
-
Upload
sehrish-rafiq -
Category
Technology
-
view
76 -
download
0
description
Transcript of Lecture 22
![Page 1: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/1.jpg)
DATA COMMUNICATIONS & NETWORKING
LECTURE-22
Course Instructor : Sehrish Rafiq
Department Of Computer Science
University Of Peshawar
![Page 2: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/2.jpg)
ERROR CORRECTION
![Page 3: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/3.jpg)
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.
![Page 4: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/4.jpg)
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.
![Page 5: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/5.jpg)
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.
![Page 6: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/6.jpg)
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
![Page 7: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/7.jpg)
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
![Page 8: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/8.jpg)
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.
![Page 9: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/9.jpg)
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.
![Page 10: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/10.jpg)
REDUNDANCY BIT CALCULATION
![Page 11: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/11.jpg)
EXAMPLE OF REDUNDANCY BIT CALCULATION
![Page 12: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/12.jpg)
ERROR DETECTION USING HAMMING CODE
![Page 13: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/13.jpg)
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.
![Page 14: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/14.jpg)
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.
![Page 15: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/15.jpg)
BURST ERROR CORRECTION EXAMPLE
![Page 16: Lecture 22](https://reader035.fdocuments.us/reader035/viewer/2022081518/54907059b47959460a8b462a/html5/thumbnails/16.jpg)
THANKS!!!