Error Detection and Correction - Chapter 10
Error Detection and Correction - Chapter 10
Error Detection and Correction - Chapter 10
Error Detection
and
Correction
10.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
• Data can be corrupted during transmission.
A codeword consists:
n bits
k are data bits
r are check bits.
Let m = r, then we have: n = 2m -1
and k = n-m
Example: r=3, n=8-1=7 and k=n-3=8
Hamming Code- Error Detection
Codewords:
[Data bits(Datawords) parity bits]
Codeword
D4 D3 D2 P3 D1 P2 P1
7 6 5 4 3 2 1
C7 C6 C5 C4 C3 C2 C1
Codeword formation:
Codeword
D4 D3 D2 P3 D1 P2 P1
7 6 5 4 3 2 1
C7 C6 C5 C4 C3 C2 C1
Solution:
P1 ={ D1 D2 D4} = {1 1 1}=Total no. of 1s is odd, thus P1=1
Codeword
D4 D3 D2 P3 D1 P2 P1
1 0 1 0 1 0 1
The structure of the encoder and decoder for a Hamming code
Dataword Dataword
Parities
Codeword Codeword
Assume we have received: codeword as
‘1110101’ at the receiver.
Codeword
1 1 1 0 1 0 1
7 6 5 4 3 2 1
C7 C6 C5 C4 C3 C2 C1
10.
Table 10.6 A CRC code with C(7, 4)
Divisor: 1011
Figure 10.14 CRC encoder and decoder
Transmitted
codeword:
100100001
Using Polynomials
We can use a polynomial to represent a
binary word.
Each bit from right to left is mapped onto a
power term.
The rightmost bit represents the “0” power
term. The bit next to it the “1” power term,
etc.
If the bit is of value zero, the power term is
deleted from the expression.
Figure 10.21 A polynomial to represent a binary word
Figure 10.22 CRC division using polynomials
Note
10.
Note
In a cyclic code,
If s(x) ≠ 0, one or more bits is corrupted.
If s(x) = 0, either
a. No bit is corrupted. or
b. Some bits are corrupted, but the
decoder failed to detect them.
10.