0% found this document useful (0 votes)
36 views

Slides 08 6 4

This document discusses cyclic codes and their use in error detection and correction. It begins by explaining how systematic cyclic codes can be obtained through a procedure that is slightly more complicated than polynomial multiplication encoding. It then provides examples of systematic encoding and computing the systematic generator and parity check matrices for a (7,3) cyclic code. The document discusses implementations of cyclic codes using shift registers, including how to perform operations like multiplication in extension fields. It also covers topics like error detection, decoding algorithms, syndrome decoding, and examples of commonly used CRC codes.

Uploaded by

mohammed229
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Slides 08 6 4

This document discusses cyclic codes and their use in error detection and correction. It begins by explaining how systematic cyclic codes can be obtained through a procedure that is slightly more complicated than polynomial multiplication encoding. It then provides examples of systematic encoding and computing the systematic generator and parity check matrices for a (7,3) cyclic code. The document discusses implementations of cyclic codes using shift registers, including how to perform operations like multiplication in extension fields. It also covers topics like error detection, decoding algorithms, syndrome decoding, and examples of commonly used CRC codes.

Uploaded by

mohammed229
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

$

'

S-72.3410 Cyclic Codes

'

S-72.3410 Cyclic Codes

Example: Systematic Encoding (1)


We consider the (7, 3) binary cyclic code with generator polynomial
g(x) = x4 + x3 + x2 + 1 discussed in a previous example, and
encode 101 = 1 + x2 = m(x).

Systematic Cyclic Codes


Polynomial multiplication encoding for cyclic linear codes is easy.
Unfortunately, the codes obtained are in most cases not systematic.
Systematic cyclic codes can be obtained through a procedure that
is only slightly more complicated than the polynomial
multiplication procedure.

Step 1. xnk m(x) = x4 (x2 + 1) = x6 + x4 .


Step 2. x6 + x4 = (x4 + x3 + x2 + 1)(x2 + x + 1) + (x + 1), so
d(x) = x + 1 (Carry out the necessary division in the same way
as you learnt in elementary school! ).
Step 3. c(x) = x6 + x4 (x + 1) = 1 + x + x4 + x6 , and the
transmitted codeword is 1100101.

&
'

c Patric Osterg

ard

S-72.3410 Cyclic Codes

Systematic Encoding

'

S-72.3410 Cyclic Codes

The systematic generator matrix is obtained by selecting as rows


the codewords associated with the messages 100, 010, and 001. The
parity check matrix is obtained using the basic result (presented
earlier) that H = [Ink | PT ] with G = [P | Ik ]. In the current
example, we get

Step 1. Multiply the message polynomial m(x) by xnk .


Step 2. Divide the result of Step 1 by the generator polynomial
g(x). Let d(x) be the remainder.
Step 3. Set c(x) = x

c Patric Osterg

ard

Example: Systematic Encoding (2)

Consider an (n, k) cyclic code C with generator polynomial g(x).


The k-symbol message block is given by the message polynomial
m(x).

nk

&

m(x) d(x).

This encoding works, as (1) c(x) is a multiple of g(x) and therefore


a codeword, (2) the first n k coefficients of xnk m(x) are zero,
and (3) only the first n k coefficients of d(x) are nonzero (the
degree of g(x) is n k).
&

1 0

G= 1 1
0 1
%

c Patric Osterg

ard

&

1 1 1 0
1 0 0 1
1 1 0 0

1 0 0

0 1 0

0 , H =
0 0 1

1
0 0 0

0 1 1 0

0 0 1 1

.
0 1 1 1

1 1 0 1

c Patric Osterg

ard

'

S-72.3410 Cyclic Codes

Elements , GF(2m ) are represented as binary m-tuples


(a0 , a1 , . . . , am1 ) and (b0 , b1 , . . . , bm1 ), respectively.

Data rates are very high in many applications


only very fast decoders and encoders can be used.

Then the addition of and gives


(a0 + b0 , a1 + b1 , . . . , am1 + bm1 ), where + is binary addition.
The nonbinary addition circuit is shown in [Wic, Fig. 5-2].

Fast circuits are, for example, simple exclusive OR (XOR) gates,


switches, and shift registers. For nonbinary encoders and decoders,
finite-field adder and multiplier circuits are needed. We now focus
on shift-register (SR) encoders and decoders for cyclic codes.

The non-binary shift-register cells are implemented with one


flip-flop for each coordinate in the m-tuple; see [Wic, Fig. 5.4].
%

c Patric Osterg

ard

'

S-72.3410 Cyclic Codes

&

c Patric Osterg

ard

'

S-72.3410 Cyclic Codes

Operational Elements in Shift Registers

Multiplication in Extension Fields

The symbology used is depicted in [Wic, Fig. 5-1].

As an example, we consider multiplication in GF(24 ) of an arbitrary


value = b0 + b1 + b2 2 + b3 3 by a fixed value g = 1 + , where
is a root of the primitive polynomial x4 + x + 1. Then

half-adder Adds the input values without carry. In the binary


case, XOR.

SR cell Flip-flops. In the binary case, one.


fixed multiplier Multiplies the input value with a given value. In
the binary case, existence or absence of connection.
In the nonbinary case, we assume that the field is a binary
extension field: GF(pm ) with p = 2. The circuits are substantially
more complicated when p 6= 2.
&

Addition and SRs in Extension Fields

Implementations of Cyclic Codes

&

'

S-72.3410 Cyclic Codes

(b0 + b1 + b2 2 + b3 3 )(1 + )

b0 + (b0 + b1 ) + (b1 + b2 )2 + (b2 + b3 )3 + b3 4

b0 + (b0 + b1 ) + (b1 + b2 )2 + (b2 + b3 )3 + b3 ( + 1)

(b0 + b3 ) + (b0 + b1 + b3 ) + (b1 + b2 )2 + (b2 + b3 )3 .

The corresponding multiplier circuit is illustrated in [Wic, Fig. 5-3].


%

c Patric Osterg

ard

&

c Patric Osterg

ard

'

S-72.3410 Cyclic Codes

11

Error Detection for Systematic Codes

c = (c0 , c1 , . . . , cn ) = (d0 , d1 , . . . , dnk1 , m0 , m1 , . . . , mk1 ).


|
{z
} |
{z
}
remainder block
message block

With message polynomial m(x) = m0 + m1 x + + mk1 xk1 and


generator polynomial g(x), the codeword polynomial is

Error detection is performed on a received word r as follows.

c(x) = m(x)g(x)
= m0 g(x) + m1 xg(x) + + mk1 xk1 g(x).
The corresponding SR circuit is shown in [Wic, Fig. 5-5].

'

The transmitted codeword of a systematic cyclic code has the form

Nonsystematic Encoders

&

'

S-72.3410 Cyclic Codes

c Patric Osterg

ard

S-72.3410 Cyclic Codes

10

Systematic Encoders

'

c Patric Osterg

ard

S-72.3410 Cyclic Codes

12

Syndrome Computation for Systematic Codes

Denote the received word by r with m and d in the message and


parity positions, respectively. Let d be a valid parity block of
message m (cf. previous slide), and denote this valid word by r .

Step 1. (Multiply m(x) by xnk .) Easy, shown in [Wic, Fig. 5-8].


Step 2. (Divide the result of Step 1 by g(x), and let d(x) be the
remainder.) Polynomial division is carried out through the use
of a linear feedback shift register (LFSR) as shown in [Wic,
Fig. 5-9], where a(x) is divided by g(x), and q(x) and d(x) are
the quotient and remainder, respectively.

s = rHT
= (r r )HT (as r HT = 0)
= (d0 d0 , d1 d1 , . . . , dnk1 dnk1 , 0, 0, . . . , 0)HT
|
{z
}
dd

Step 3. (Set c(x) = xnk m(x) d(x).) Achieved by combining the


two SR circuits for the previous steps, as shown in [Wic, Fig.
5-12].
An alternative encoder for cyclic codes, not considered here, is
presented in [Wic, Fig. 5-13].
&

1. Denote the values in the message and parity positions of


the received word r by m and d, respectively.
2. Encode m using an encoder identical to that used by the
transmitter, and denote the remainder block obtained in
this way by d .
3. Compare d with d . If they are different, then the received
word contains errors.
&

= dd,

since the parity check matrix has the form H = [Ink | PT ].

c Patric Osterg

ard

Syndromes for nonsystematic codes can also be computed through


the use of shift registers.
&

c Patric Osterg

ard

'

S-72.3410 Cyclic Codes

13

'

S-72.3410 Cyclic Codes

15

Error-Correction Approaches
Decoding Algorithm for Cyclic Codes
Error correction has earlier been discussed for general linear codes.
1.
2.
3.
4.
5.

Let i := 0. Compute the syndrome s for a received vector r.


If s is in the syndrome look-up table, goto Step 6.
Let i := i + 1. Enter a 0 into the SR input, computing si .
If si is not in the syndrome look-up table, goto Step 3.
Let ei be the error pattern corresponding to the syndrome
si . Determine e by cyclically shifting ei i times to the left.
6. Let c := r e. Output c.

A standard array has q n entries.


A syndrome table has q nk entries.
We shall see that the number of entries of a syndrome table
for cyclic linear codes can be reduced to approximatively
q nk /n.
With more (algebraic) structure of the codes, even more
powerful decoding is possible (to be discussed in
forthcoming lectures).
&

c Patric Osterg

ard

'

S-72.3410 Cyclic Codes

14

&

c Patric Osterg

ard

'

S-72.3410 Cyclic Codes

16

Example: Error Correction of (7,4) Cyclic Code


Syndrome Decoding for Cyclic Codes
Consider the (7,4) binary cyclic code generated by
g(x) = x3 + x + 1, with parity check polynomial
h(x) = (x7 + 1)/g(x) = x4 + x2 + x + 1, and with parity check
matrix

1 0 1 1 1 0 0

H=
0 1 0 1 1 1 0 .
0 0 1 0 1 1 1

Theorem 5-3. Let s(x) be the syndrome polynomial


corresponding to a received polynomial r(x). Let ri (x) be the
polynomial obtained by cyclically shifting the coefficients of r(x) i
steps to the right. Then the remainder obtained when dividing
xs(x) by g(x) is the syndrome s1 (x) corresponding to r1 (x).
Having computed the syndrome s with an SR division circuit, we
get si (x) after the input of i 0s into the circuit! We then need only
store one syndrome s for an error pattern e and all cyclic shifts of e.
&

This is a one-error-correcting Hamming code, so all correctable


error patterns are cyclic shifts of 0000001. An SR error-correction
circuit for this code is displayed in [Wic, Fig. 5-14].
%

c Patric Osterg

ard

&

c Patric Osterg

ard

'

S-72.3410 Cyclic Codes

17

'

S-72.3410 Cyclic Codes

19

Some Generator Polynomials


Error Detection in Practice
The most frequently used error control techniques in the history of
computers and communication networks are:

CRC-4

g4 (x) = x4 + x3 + x2 + x + 1

CRC-12

g12 (x) = (x11 + x2 + 1)(x + 1)

CRC-ANSI

gA = (x15 + x + 1)(x + 1)

CRC-CCITT

gC = (x15 + x14 + x13 + x12 + x4 + x3 + x2 + x + 1)

one-bit parity check Very simple, but yet important.

(x + 1)

CRC codes Shortened cyclic codes that have extremely simple


and fast encoder and decoder implementations.

&

Example. The polynomial g12 (x) divides x2047 1 but no


polynomial xm 1 with smaller degree, so it defines a cyclic code of
length 2047 and dimension 2047 12 = 2035. So, CRC-12 encodes
up to 2035 message bits, generating 12 bits of redundancy.
%

c Patric Osterg

ard

'

S-72.3410 Cyclic Codes

18

&

'

S-72.3410 Cyclic Codes

Properties of CRC Codes

20

Error Detection Performance Analysis

Cyclic redundancy check (CRC) codes are shortened


cyclic codes obtained by deleting the j rightmost
coordinates in the codewords.
CRC codes are generally not cyclic.
CRC codes can have the same SR encoders and decoders as
the original cyclic code.
CRC codes have error detection and correction capabilities
that are at least as good as those of the original cyclic code.
CRC codes have good burst-error detection capabilities.
&

c Patric Osterg

ard

The error detection performance of codes depends of the type of


errors. In performance analysis, the following three situations are
most often considered.
1. Total corruption of words.
2. Burst errors. These are errors that occur over several
consecutive transmitted symbols.
3. The binary symmetric channel.

c Patric Osterg

ard

&

c Patric Osterg

ard

'

S-72.3410 Cyclic Codes

21

'

S-72.3410 Cyclic Codes

23

Total Corruption of Words


When an (n, k) code is used, total corruption leads to a decoder
error with probability
qk
= q kn .
qn

The Binary Symmetric Channel


An exact determination of the performance of a CRC code over the
binary symmetric channel requires knowledge of the weight
distribution of the code.

Note that this probability is solely a function of the number of


redundant symbols in the transmitted codewords.
Example. With CRC-12, an error is detected with probability
1 212 0.999756 in case of total corruption.
&

c Patric Osterg

ard

'

S-72.3410 Cyclic Codes

22

Burst-Error Detection
A burst-error pattern of length b starts and ends with nonzero
symbols; the intervening symbols may be take on any value,
including zero.
Theorems 5-4, 5-5, and 5-6. A q-ary cyclic or shortened cyclic
codes with generator polynomial g(x) of degree r can detect all
burst error patterns of length r or less; the fraction 1 q 1r /(q 1)
of burst error patterns of length r + 1; and the fraction 1 q r of
burst error patterns of length greater than r + 1.
Example. With CRC-12, all bursts of length at most 12, 99.95%
of bursts of length 13, and 99.976% of longer bursts are detected.
&

c Patric Osterg

ard

&

c Patric Osterg

ard

You might also like