Professional Documents
Culture Documents
1 (6 Fec) PDF
1 (6 Fec) PDF
1
Ch10. Error Detection & Correction (Forouzan)
2
Error Detection & Correction
Type of Errors
To detect or correct errors, we need to send extra (redundant) bits with data.
Error Detection & Correction
Example:
- The Hamming distance between two pairs of words.
1. The Hamming distance d(000, 011) is 2 because 000 011 is 011 (two 1s).
2. The Hamming distance d(10101, 11110) is 3 because 10101 11110 is 01011 (three 1s).
- The dmin in set of code-word is 3
d(00000, 01011) = 3 d(01011, 10101) = 4
d(00000, 10101) =3 d(01011, 11110) = 3
d(00000, 11110) = 4 d(10101, 11110) =3
Error Detection & Correction
BLOCK CODING
Hamming distance
Error Detection & Correction
BLOCK CODING
Parity-check code
- Let r be the length of the data string for a given parity check code and let r be the
number of parity checks.
- Example: k =3, r = 4 n = 7
Error Detection & Correction
BLOCK CODING
Parity-check code
Example :
- Data stream ...0101110011010110011010. mapping with k=3, r=4
To transmit .0100111111010000111011010011011101000111011011001
To receive
framing
.0100111111010000111011010011011101000111011011001
error detect
- de-map
- eliminate redundancies
...0101110011010110011010.
Error Detection & Correction
BLOCK CODING
Hamming code
- Consider a Hamming codes they were originally designed with dmin = 3, which
means that they can detect up to two errors or correct one single error.
- The relationship between n and k in a Hamming code which need to choose an
integer r 3 (the number of check bits). The values of nand k are then calculated
from r as n = 2r 1 and k = n - r
Error Detection & Correction
BLOCK CODING
Hamming code
BLOCK CODING
Hamming code
Example:
The data-word 0111 becomes the code-word 0111001.
The code-word 0011001 is received.
The syndrome is 011.
According to Table 10.5, b2 is in error. After flipping b2 (changing the 1 to 0),
The final data-word is 0111.
Error Detection & Correction
BLOCK CODING
Cyclic Redundancy Checks (CRC)
BLOCK CODING
Cyclic Redundancy Checks (CRC)
- Example
BLOCK CODING
Cyclic Redundancy Checks (CRC)
- Hardware design of the divisor in CRC
A CRC is implemented using a feedback shift register
Error Detection & Correction
BLOCK CODING
Check-Sum
BLOCK CODING
Check sum
Example :
- Data stream ...010111001101011001101011. sum with k= r=4
M: sum 0101(5)1100(12)1101(13)0110(6)0110(6)1011(11). = 53~(5)
R: check-sum = -5 = 1010 + 1 = 1011
To transmit ...010111001101011001101011 1011 .
To receive
framing
...010111001101011001101011 1011 .
error detect
- de-map
- eliminate redundancies
...010111001101011001101011.
Thanks
17