+ All Categories
Home > Documents > WEEK CYCLIC CODESCyclic property: Any cyclic shift of a code word in the code is also a code word....

WEEK CYCLIC CODESCyclic property: Any cyclic shift of a code word in the code is also a code word....

Date post: 06-Aug-2021
Category:
Upload: others
View: 5 times
Download: 5 times
Share this document with a friend
6
UNIVERSITY OF ANBAR LECTURE NOTES ON INFORMATION THEORY FOR 4 th CLASS STUDENTS COLLEGE OF ENGINEERING by: Dr. Naser Al-Falahy ELECTRICAL ENGINEERING - 70 - CYCLIC CODES Cyclic codes form a subclass of linear block codes. Indeed, many of the important linear block codes discovered to date are either cyclic codes or closely related to cyclic codes. An advantage of cyclic codes over most other types of codes is that they are easy to encode Furthermore; cyclic codes possess a well-defined mathematical structure, which has led t the development of very efficient decoding schemes for them. A binary code is said to be a cyclic code if it exhibits two fundamental properties- Linearity property: The sum of any two code words in the code is also a code word Cyclic property: Any cyclic shift of a code word in the code is also a code word. Cyclic codes are such that code words are simple lateral shifts of one another. For example, if c = (c 1, c 2, ...c n-1, c n) is a code word, then so are (C2, C 3 , ..., cn, c1) and (C3, C4 , … , c n, c 1, c2), and so on. We shall use the following notation. If c = (c 1, c 2, ..., c n) is a code vector of a code C, then c (i) denotes c shifted cyclically i places to the left, that is, c (i) = (ci+1 + c i+2 ,…. c n, c 1, c 2, ..., c i ) Cyclic codes can be described in a polynomial form. This property is extremely useful in the analysis and implementation of these codes. The code vector c can be expressed as the (n - 1)-degree polynomial. c(x) = c 1 x n-1 + c 2 x n-2 + . . . + c n Modulo-2 addition is used everywhere in the mathematical processes. One of the interesting verify this property as follows: Also note that: c(x)= d(x)g(x) The generator polynomial g(x) must be of the order n — k WEEK 13
Transcript
Page 1: WEEK CYCLIC CODESCyclic property: Any cyclic shift of a code word in the code is also a code word. Cyclic codes are such that code words are simple lateral shifts of one another. For

UNIVERSITY OF ANBAR LECTURE NOTES ON INFORMATION THEORY FOR 4th

CLASS STUDENTS

COLLEGE OF ENGINEERING by: Dr. Naser Al-Falahy ELECTRICAL ENGINEERING

- 70 -

CYCLIC CODES

Cyclic codes form a subclass of linear block codes. Indeed, many of the important

linear block codes discovered to date are either cyclic codes or closely related to cyclic

codes. An advantage of cyclic codes over most other types of codes is that they are easy

to encode Furthermore; cyclic codes possess a well-defined mathematical structure,

which has led t the development of very efficient decoding schemes for them.

A binary code is said to be a cyclic code if it exhibits two fundamental properties-

Linearity property: The sum of any two code words in the code is also a code

word

Cyclic property: Any cyclic shift of a code word in the code is also a code word.

Cyclic codes are such that code words are simple lateral shifts of one another. For example, if c = (c1, c2, ...cn-1, cn) is a code word, then so are (C2, C3, . . . , cn, c1) and (C3, C4 , … , cn, c1, c2), and so on. We shall use the following notation. If

c = (c1, c2, ..., cn)

is a code vector of a code C, then c(i) denotes c shifted cyclically i places to the left, that

is,

c(i) = (ci+1 + ci +2 ,…. cn, c1, c2, ..., ci)

Cyclic codes can be described in a polynomial form. This property is extremely useful in

the analysis and implementation of these codes. The code vector c can be expressed as

the (n - 1)-degree polynomial.

c ( x ) = c 1 x n - 1 + c 2 x n - 2 + . . . + c n

Modulo-2 addition is used everywhere in the mathematical processes.

One of the interesting verify this property as follows:

Also note that:

c(x)= d(x)g(x)

The generator polynomial g(x) must be of the order n — k

WEEK 13

Page 2: WEEK CYCLIC CODESCyclic property: Any cyclic shift of a code word in the code is also a code word. Cyclic codes are such that code words are simple lateral shifts of one another. For

UNIVERSITY OF ANBAR LECTURE NOTES ON INFORMATION THEORY FOR 4th

CLASS STUDENTS

COLLEGE OF ENGINEERING by: Dr. Naser Al-Falahy ELECTRICAL ENGINEERING

- 71 -

Example: Find a generator polynomial g(x) for a (7,4) cyclic code, and find code vectors

for the following data vectors: 1010,1111, 0001, and 1000.

In this case n = 7 and n — k = 3, and

x7 + 1 = (x + l)(x3 + x + 1 ) ( x 3 + x 2 + 1 )

For a (7, 4) code, the generator polynomial must be of the order n — k = 3, In this

case, there are two possible choices for g ( x ): (x3 + x + 1) or (x3 + x2 + 1). Let us choose

the 2nd choice,

g ( x ) = x3 + x2 + 1

Now , for d= 1010

d(x)= x3+x,

c(x)=d(x)g(x) = (x3+x)( x3 + x2 + 1)= x6+x5+x4+x

Hence; c= 1 1 1 0 0 1 0

The same scenario should be applied on the other data, yields:

d c

1010 1110010

1111 1001011

0001 0001101

1000 1101000

Note the structure of the code words. The first k digits are not necessarily the data

digits. Hence, this is not a systematic cyclic code.

Systematic Cyclic Codes

In a systematic code, the first k digits are data digits, and the last m = n — k digits

are the parity-check digits. Systematic codes are a special case of general codes. Our

discussion thus far applies to general cyclic codes, of which systematic cyclic codes are a

special case. We shall now develop a method of generating systematic cyclic codes.

We shall show that for a systematic code, the code word polynomial c ( x )

corresponding to the data polynomial d(x) is given by:

where ρ(x) is the remainder from dividing xn - k d(x) by g(x)

Page 3: WEEK CYCLIC CODESCyclic property: Any cyclic shift of a code word in the code is also a code word. Cyclic codes are such that code words are simple lateral shifts of one another. For

UNIVERSITY OF ANBAR LECTURE NOTES ON INFORMATION THEORY FOR 4th

CLASS STUDENTS

COLLEGE OF ENGINEERING by: Dr. Naser Al-Falahy ELECTRICAL ENGINEERING

- 72 -

�(�) = ��� �����(�)

�(�)

Example: Construct a systematic (7, 4) cyclic code using a generator polynomial, we use:

g(x) = x 3 + x 2 + 1

Consider a data vector d = 1010, then d(x) = x3 +x

�����(�) = ��(�� + �) = �� + ��

�(�) = �����(�) + �(�) = ��(�� + �) + 1 = �� + �� + 1 then, c(x)= 1010001

using the code generating matrix G. Using the earlier procedure, we compute the code

words corresponding to the data words 1000,0100,0010,0001. These are 1000110,

0100011, 0010111, 0001101. Now recognize that these four code words are the four

rows of G. This is because c = dG , and when d = 1000, dG is the first row of G, and so

on. Hence,

Now, we can construct the rest of the code table using c = dG. This is an efficient

method because it allows us to construct the entire code table from the knowledge of

only n code words.

Table a below shows the complete code. Note that 4m, the minimum distance between

two code words, is 3. Hence, this is a single-error correcting code, and 14 of these code

Page 4: WEEK CYCLIC CODESCyclic property: Any cyclic shift of a code word in the code is also a code word. Cyclic codes are such that code words are simple lateral shifts of one another. For

UNIVERSITY OF ANBAR LECTURE NOTES ON INFORMATION THEORY FOR 4th

CLASS STUDENTS

COLLEGE OF ENGINEERING by: Dr. Naser Al-Falahy ELECTRICAL ENGINEERING

- 73 -

words can be obtained by successive cyclic shifts of the two code words 1110010 and

1101000. The remaining two code words 1111111 and 0000000 remain unchanged

under cyclic shift.

Table a Data vs. cyclic code words

Cyclic Code Decoding

In decoding the cyclic code, we consider that:

If no error occurred during the transmission, no remainder remains & the syndrome

s(x) is zero(no error).

Note that the syndrome is of order s(x)= n-k-1

For noisy channel; certain error may occurs that make the received code:

r(x) =c(x)+e(x)

with non-zero syndrome:

Page 5: WEEK CYCLIC CODESCyclic property: Any cyclic shift of a code word in the code is also a code word. Cyclic codes are such that code words are simple lateral shifts of one another. For

UNIVERSITY OF ANBAR LECTURE NOTES ON INFORMATION THEORY FOR 4th

CLASS STUDENTS

COLLEGE OF ENGINEERING by: Dr. Naser Al-Falahy ELECTRICAL ENGINEERING

- 74 -

Again, as before, a received word r could result from any one of the 2k code words and

a suitable error. For example, for the code in the above table, if r = 0110010, this could

mean c = 1110010 and e = 1000000, or c = 1101000 and e = 1011010, or 14 more

such combinations. As seen earlier, the most likely error pattern is the one with the

minimum weight (or minimum number of 1's). Hence, here c = 1110010 and e =

1000000 is the correct decision.

It is convenient to prepare a decoding table, that is, to list the syndromes for all

correctable errors. For any r, we compute the syndrome, and from the table we find the

corresponding correctable error e . Then we determine c = r + e .

Example

Construct the decoding table for the single-error correcting (7,4) code, Determine the

data vectors transmitted for the following received vectors r : (a) 1101101; (b)

0101000; (c) 0001100.

Solution:-

The first step is to construct the decoding table. Because n — k — 1 = 2, the syndrome

polynomial is of the second order, and there are seven possible nonzero syndromes.

There are also seven possible correctable single-error patterns because n — 1 . We

should compute the syndrome for each of the seven correctable error patterns. For

example, for e = 1000000, e ( x ) = x6. Because g ( x ) = x3 + x 2 + 1 , for this code, we

have:

This make the syndrome to be s= 110

In similar way, we repeat the above scenario to calculate other syndrome for the other

error patterns, as shown in table b:

Page 6: WEEK CYCLIC CODESCyclic property: Any cyclic shift of a code word in the code is also a code word. Cyclic codes are such that code words are simple lateral shifts of one another. For

UNIVERSITY OF ANBAR LECTURE NOTES ON INFORMATION THEORY FOR 4th

CLASS STUDENTS

COLLEGE OF ENGINEERING by: Dr. Naser Al-Falahy ELECTRICAL ENGINEERING

- 75 -

Tabel (b) error vs. syndrom

When the received word r is 1101101,

r ( x ) = x 6 + x 5 + x 3 + x 2 + 1 ,

We now compute s ( x )

Hence, s = 101. From Table (b), this gives e = 0001000, and

c = r ⨁ e = 1101101 ⨁ 0001000 = 1100101

Hence, from table(a) we have

d = 1100

In a similar way, we determine for r = 0101000, s = 110 and e = 1000000; hence c =

r ⨁ e = 1101000, and d = 1101. For r = 0001100, s = 001 and e = 0000001; hence c

= r ⨁ e = 0001101, and d = 0001.


Recommended