Error Control
Error Control
and
Correction
10.1
Chapter 10 Copyright © The McGraw-Hill Companies, Inc.
Permission required for reproduction or display.
Error
Note
Data can be corrupted
during transmission.
10.2
10-1 INTRODUCTION
10.3
Note
In a single-bit error, only 1 bit in the data
unit has changed.
10.4
Figure 10.1 Single-bit error
10.5
Note
A burst error means that 2 or more bits
in the data unit have changed.
10.6
Figure 10.2 Burst error of length 8
10.7
Note
To detect or correct errors, we need to
send extra (redundant) bits with data.
10.8
Figure 10.3 The structure of encoder and decoder
10.9
Note
In this book, we concentrate on block
codes; we leave convolution codes
to advanced texts.
10.10
Note
In modulo-N arithmetic, we use only the
integers in the range 0 to N −1,
inclusive.
10.11
Figure 10.4 XORing of two single bits or two words
10.12
10.13
Figure 10.5 Datawords and codewords in block coding
10.14
Example 10.1
10.15
Figure 10.6 Process of error detection in block coding
10.16
Example 10.2
10.17
Example 10.2 (continued)
Note
An error-detecting code can detect
only the types of errors for which it is
designed; other types of errors may
remain undetected.
10.20
Figure 10.7 Structure of encoder and decoder in error
correction
10.21
Example 10.3
10.22
Example 10.3 (continued)
1. Comparing the received codeword with the first
codeword in the table (01001 versus 00000), the
receiver decides that the first codeword is not
the one that was sent because there are two
different bits.
Note
The Hamming distance between two
words is the number of differences
between corresponding bits.
10.25
Example 10.4
because
10.26
Note
The minimum Hamming distance is the
smallest Hamming distance between
all possible pairs in a set of words.
10.27
Example 10.5
10.28
Example 10.6
Solution
We first find all the Hamming distances.
10.29
Note
To guarantee the detection of up to s
errors in all cases, the minimum
Hamming distance in a block code
must be dmin = s + 1.
10.30
Example 10.7
10.32
Figure 10.8 Geometric concept for finding dmin in error
detection
10.33
Figure 10.9 Geometric concept for finding dmin in error
correction
10.34
Note
To guarantee correction of up to t errors
in all cases, the minimum Hamming
distance in a block code
must be dmin = 2t + 1.
10.35
Example 10.9
Solution
This code guarantees the detection of up to three
errors (s = 3), but it can correct up to one error. In
other words, if this code is used for error
correction, part of its capability is wasted. Error
correction codes need to have an odd minimum
distance (3, 5, 7, . . . ).
10.36
10-3 LINEAR BLOCK CODES
10.37
Note
In a linear block code, the exclusive OR
(XOR) of any two valid codewords
creates another valid codeword.
10.38
Example 10.10
10.40
Note
A simple parity-check code is a
single-bit error-detecting
code in which
n = k + 1 with dmin = 2.
10.41
Table 10.3 Simple parity-check code C(5, 4)
10.42
Figure 10.10 Encoder and decoder for simple parity-check
code
10.43
Example 10.12
Note
A simple parity-check code can detect
an odd number of errors.
10.46
Note
All Hamming codes discussed in this
book have dmin = 3.
10.47
Figure 10.11 Two-dimensional parity-check code
10.48
Figure 10.11 Two-dimensional parity-check code
10.49
Figure 10.11 Two-dimensional parity-check code
10.50
Table 10.4 Hamming code C(7, 4)
10.51
Figure 10.12 The structure of the encoder and decoder for
a Hamming code
10.52
Table 10.5 Logical decision made by the correction logic analyzer
10.53
Example 10.13
10.55
Figure 10.13 Burst error correction using Hamming code
10.56
10-4 CYCLIC CODES
Cyclic codes are special linear block codes with
one extra property. In a cyclic code, if a
codeword is cyclically shifted (rotated), the
result is another codeword.
10.64
Figure 10.20 General design of encoder and decoder of a
CRC code
10.65
Figure 10.21 A polynomial to represent a binary word
10.66
Figure 10.22 CRC division using polynomials
10.67
Note
The divisor in a cyclic code is normally
called the generator polynomial or
simply the generator.
10.68
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.69
Note
In a cyclic code, those e(x) errors that
are divisible by g(x) are not caught.
10.70
Note
If the generator has more than one term
and the coefficient of x0 is 1,
all single errors can be caught.
10.71
Example 10.15
10.72
Figure 10.23 Representation of two isolated single-bit errors using
polynomials
10.73
Note
If a generator cannot divide xt + 1
(t between 0 and n – 1),
then all isolated double errors
can be detected.
10.74
Example 10.16
Note
A generator that contains a factor of
x + 1 can detect all odd-numbered
errors.
10.76
Note
❏ All burst errors with L ≤ r will
be detected.
❏ All burst errors with L = r + 1 will
be detected with probability 1 –
(1/2)r–1. ❏ All burst errors with L > r +
1 will be detected with probability 1 –
(1/2)r.
10.77
Example 10.17
10.78
Example 10.17 (continued)
10.79
Note
A good polynomial generator needs to
have the following characteristics: 1. It
should have at least two terms. 2. The
coefficient of the term x0 should be 1.
3. It should not divide xt + 1, for t
between 2 and n − 1.
4. It should have the factor x + 1.
10.80