Professional Documents
Culture Documents
Digital Communication Systems by Simon Haykin-104
Digital Communication Systems by Simon Haykin-104
Digital Communication Systems by Simon Haykin-104
Hence, substituting (10.32) and (10.43) into the preceding equation, we get
e X = u X g X + s X (10.44)
where the quotient is u X = a X + q X . Equation (10.44) shows that s(X) is also the
syndrome of the error polynomial e(X). The implication of this property is that when the
syndrome polynomial s(X) is nonzero, the presence of transmission errors in the received
vector is detected.
PROPERTY 2 Let s(X) be the syndrome of a received word polynomial r(X). Then, the syndrome of
Xr(X), representing a cyclic shift of r(X), is Xs(X).
Applying a cyclic shift to both sides of (10.43), we get
Xr X = Xq X g X + Xs X (10.45)
from which we readily see that Xs(X) is the remainder of the division of Xr(X) by g(X).
Hence, the syndrome of Xr(X) is Xs(X) as stated. We may generalize this result by stating
i i
that if s(X) is the syndrome of r(X), then X s X is the syndrome of X r X .
PROPERTY 3 The syndrome polynomial s(X) is identical to the error polynomial e(X), assuming that the
errors are confined to the n – k parity-check bits of the received word polynomial r(X).
The assumption made here is another way of saying that the degree of the error
polynomial e(X) is less than or equal to n – k – 1 . Since the generator polynomial g(X)
is of degree n – k , by definition, it follows that (10.44) can only be satisfied if the
quotient u(X) is zero. In other words, the error polynomial e(X) and the syndrome
polynomial s(X) are one and the same. The implication of Property 3 is that, under the
aforementioned conditions, error correction can be accomplished simply by adding the
syndrome polynomial s(X) to the received vector r(X).
Next, we illustrate the procedure for the construction of a codeword by using this
generator polynomial to encode the message sequence 1001. The corresponding message
vector is given by
3
mX = 1 + X
n–k 3
Hence, multiplying m(X) by X = X , we get
n–k 3 6
X mX = X + X
n–k
The second step is to divide X m X by g(X), the details of which (for the example at
hand) are given below:
X3 + X
3
X + X + 1 X6 + X3
X6 X + X3
4
X4
X4 + X2 + X
X2 + X
Note that in this long division we have treated subtraction the same as addition since we
are operating in modulo-2 arithmetic. We may thus write
3 6 2
X +X 3 X+X
------------------------- = X + X + -------------------------
3 3
1+X+X 1+X+X
That is, the quotient a(X) and remainder b(X) are as follows, respectively:
3
aX = X + X
2
b X = X + X
Hence, from (10.35) we find that the desired code vector is
n–k
cX = b X + X mX
2 3 6
= X+X +X +X
The codeword is therefore 0111001. The four rightmost bits, 1001, are the specified
message bits. The three leftmost bits, 011, are the parity-check bits. The codeword thus
generated is exactly the same as the corresponding one shown in Table 10.1 for a (7,4)
Hamming code.
We may generalize this result by stating that:
We next show that the generator polynomial g(X) and the parity-check polynomial h(X)
uniquely specify the generator matrix G and the parity-check matrix H, respectively.
To construct the 4-by-7 generator matrix G, we start with four vectors represented by
g(X) and three cyclic-shifted versions of it, as shown by
Haykin_ch10_pp3.fm Page 601 Friday, January 4, 2013 5:03 PM
3
gX = 1 + X + X
2 4
XgX = X + X + X
2 2 3 5
X gX = X + X + X
3 3 4 6
X gX = X + X + X
The vectors g(X), Xg(X), X2g(X), and X3g(X) represent code polynomials in the (7,4)
Hamming code. If the coefficients of these polynomials are used as the elements of the
rows of a 4-by-7 matrix, we get the following generator matrix:
1 1 0 1 0 0 0
G = 0 1 1 0 1 0 0
0 0 1 1 0 1 0
0 0 0 1 1 0 1
Clearly, the generator matrix G so constructed is not in systematic form. We can put it into
a systematic form by adding the first row to the third row, and adding the sum of the first
two rows to the fourth row. These manipulations result in the desired generator matrix:
1 1 0 1 0 0 0
G = 0 1 1 0 1 0 0
1 1 1 0 0 1 0
1 0 1 0 0 0 1
which is exactly the same as that in Example 1.
We next show how to construct the 3-by-7 parity-check matrix H from the parity-check
polynomial h(X). To do this, we first take the reciprocal of h(X), namely X 4 h(X –1). For the
problem at hand, we form three vectors represented by X 4 h(X –1) and two shifted versions
of it, as shown by
4 –1 2 3 4
X hX = 1+X +X +X
5 –1 3 4 5
X hX = X+X +X +X
6 –1 2 4 5 6
X hX = X +X +X +X
Using the coefficients of these three vectors as the elements of the rows of the 3-by-7
parity-check matrix, we get
1 0 11 1 0 0
H = 0 1 0 1 1 1 0
0 0 10 1 1 1
Here again we see that the matrix H is not in systematic form. To put it into a systematic
form, we add the third row to the first row to obtain
1 0 0 1 0 1 1
H = 0 1 0 1 1 1 0
0 0 1 0 1 1 1
which is exactly the same as that of Example 1.
Haykin_ch10_pp3.fm Page 602 Friday, January 4, 2013 5:03 PM
Gate
Flip-flop Modulo-2
adder Parity
bits Codeword
Message bits
Figure 10.10 Encoder for the (7,4) cyclic code generated by g(X) = 1 + X + X3.
Figure 10.10 shows the encoder for the (7,4) cyclic Hamming code generated by the
3
polynomial g X = 1 + X + X . To illustrate the operation of this encoder, consider the
message sequence (1001). The contents of the shift register are modified by the incoming
message bits as in Table 10.3. After four shifts, the contents of the shift register, and
therefore the parity-check bits, are (011). Accordingly, appending these parity-check bits
to the message bits (1001), we get the codeword (0111001); this result is exactly the same
as that determined earlier in Example 1.
Figure 10.11 shows the corresponding syndrome calculator for the (7,4) Hamming
code. Let the transmitted codeword be (0111001) and the received word be (0110001);
that is, the middle bit is in error. As the received bits are fed into the shift register, initially
set to zero, its contents are modified as in Table 10.4. At the end of the seventh shift, the
syndrome is identified from the contents of the shift register as 110. Since the syndrome is
nonzero, the received word is in error. Moreover, from Table 10.2, we see that the error
pattern corresponding to this syndrome is 0001000. This indicates that the error is in the
middle bit of the received words, which is indeed the case.
Gate
Figure 10.11
Syndrome
calculator for the
(7,4) cyclic code Received
generated by the bits
polynomial Modulo-2 Flip-flop
g(X) = 1 + X + X3. adder
Haykin_ch10_pp3.fm Page 603 Friday, January 4, 2013 5:03 PM
2 4
initial state gX = 1 + X + X + X
Haykin_ch10_pp3.fm Page 604 Friday, January 4, 2013 5:03 PM
0 0 1
Modulo-2 Flip-flop
adder
This result is readily validated by cycling through the encoder of Figure 10.12.
Note that if we were to choose the other primitive polynomial
2 3
hX = 1 + X + X
for the (7,3) maximal-length code, we would simply get the “image” of the code described
above, and the output sequence would be “reversed” in time.
Reed–Solomon Codes
A study of cyclic codes for error control would be incomplete without a discussion of
Reed–Solomon codes,5 albeit briefly.
Unlike the cyclic codes considered in this section, Reed–Solomon codes are nonbinary
codes. A cyclic code is said to be nonbinary in that given the code vector
c = c 0 c 1 c n – 1
n–1
the coefficients ci i = 0
are not binary 0 or 1. Rather, the c i are themselves made up of
sequences of 0s and 1s, with each sequence being of length k. A Reed–Solomon code is
therefore said to be a q-ary code, which means that the size of the alphabet used in
k
construction of the code is q = 2 . To be specific, a Reed–Solomon (n,k) code is used to
m m
encode m-bit symbols into blocks consisting of n = 2 – 1 symbols; that is, m 2 – 1
bits, where m 1. Thus, the encoding algorithm expands a block of k symbols to n
symbols by adding n – k redundant symbols. When m is an integer power of 2, the m-bit
symbols are called bytes. A popular value of m is 8; indeed, 8-bit Reed–Solomon codes are
extremely powerful.
A t-error-correcting Reed–Solomon code has the following parameters:
m
block length n = 2 – 1 symbols
message size k symbols
parity-check size n – k = 2t symbols
minimum distance d min = 2t + 1 symbols
The block length of the Reed–Solomon code is one less than the size of a code symbol,
and the minimum distance is one greater than the number of parity-check symbols. Reed–
Solomon codes make highly efficient use of redundancy; block lengths and symbol sizes