• No results found

Cyclic Codes

N/A
N/A
Protected

Academic year: 2021

Share "Cyclic Codes"

Copied!
20
0
0

Loading.... (view fulltext now)

Full text

(1)

By :Er. Amit Mahajan

By :Er. Amit Mahajan

CYCLIC CODES

(2)

CYCLIC CODES

CYCLIC CODES

Definition:

Definition:

 An ( An (nn,, kk) linear code) linear code C C is called ais called a cyclic codecyclic code if every cyclic shift of a codeif every cyclic shift of a code

 vector in

 vector in C C is also a code vectoris also a code vector

 Codewords can be represented as polynomials of degreeCodewords can be represented as polynomials of degree nn. For a cyclic. For a cyclic

code all codewords are multiple of some

code all codewords are multiple of some polynomialpolynomial gg(( X  X ) modulo) modulo X  X nn++11

such that

such that gg(( X  X ) divides) divides X  X nn++1.1. gg(( X  X ) is called the generator polynomial.) is called the generator polynomial.

Examples:

Examples:

 Hamming codes, Golay Codes, BCH codes, RS codesHamming codes, Golay Codes, BCH codes, RS codes

 BCH codes were independently discovered by Hocquenghem (1959) andBCH codes were independently discovered by Hocquenghem (1959) and

 by Bose and Chaudhuri (1960)  by Bose and Chaudhuri (1960)

 Reed-Solomon codes (non-binary BCH codes) wReed-Solomon codes (non-binary BCH codes) were independently ere independently 

introduced by Reed-Solomon introduced by Reed-Solomon

(3)

Cyclic codes

Cyclic codes

are of interest and importance because

are of interest and importance because

They posses rich algebraic structure that can be utilized in a

They posses rich algebraic structure that can be utilized in a

variety of ways.

variety of ways.

They have extremely concise specifications.

They have extremely concise specifications.

They can be efficiently implemented using simple

They can be efficiently implemented using simple shift 

shift 

registers.

registers.

(4)

Notations

Notations

k = Number of binary digits i

k = Number of binary digits in the message before

n the message before

encoding

encoding

n = Number of binary digits in the encoded

n = Number of binary digits in the encoded

message

message

n –

n – k =

k = r =

r = number

number of check

of check bits

bits

r  r  k  k  n n

(5)

Basic properties of Cyclic codes:

Basic properties of Cyclic codes:

Let C be a binary (n,k) linear cyclic codeLet C be a binary (n,k) linear cyclic code

1.

1. Within the set of code polynomials in C, there is a unique monicWithin the set of code polynomials in C, there is a unique monic

  polynomial

  polynomial with with minimal minimal degree degree is is called called the the generator generator   polynomials.

 polynomials.

2.

2. Every code Every code polynomial polynomial in in C, C, can can be be expressed expressed uniquely uniquely asas

3.

3. The generator The generator polynomial polynomial is is a a factor factor of of 

4.

4. The orthogonality of The orthogonality of GG andand HH in polynomial form is expressed asin polynomial form is expressed as

.

. This

This means

means

is

is also

also a

a factor

factor of 

of 

)) (( X  X  g g r r <<nn.. gg((X X )) r  r  r  r  X  X   g   g   X   X   g   g   g   g   X   X )) == ++ ++...++ (( 00 11 g g )) (( X  X  U U )) (( )) (( )) (( X  X  mm  X  X  gg X X  U U == )) (( X  X  g g 1 1 + + n n  X   X  1 1 )) (( )) (( X  X  hh  X  X  == X  X nn ++ g g hh(( X  X ))  X  X nn ++11

(6)

Polynomial Representation of Binary Information

Polynomial Representation of Binary Information

It is convenient to think

It is convenient to think of binary digits as

of binary digits as

coefficients of a polynomial in the

coefficients of a polynomial in the dummy 

dummy 

 variable X.

 variable X.

Polynomial is

Polynomial is written low-order-to-high-

written

low-order-to-high-order.

order.

Polynomials are treated according to the laws

Polynomials are treated according to the laws

of ordinary algebra with an

of ordinary algebra with an exception addition

exception addition

is to be done

(7)

Types of Cyclic Codes

Types of Cyclic Codes

There are two types of Cyclic Codes on basis of 

There are two types of Cyclic Codes on basis of 

Encoding:

Encoding:

Non-Systematic Encoding:

Non-Systematic Encoding:

Information bits are not packed together in the

Information bits are not packed together in the

codeword. These are rarely used.

codeword. These are rarely used.

c(x)= i(x) g(x)

c(x)= i(x) g(x)

Systematic Encoding:

Systematic Encoding:

Information bits are packed together in the codeword.

Information bits are packed together in the codeword.

c(x)= i(x) x

(8)

8

8

Systematic Encoding

Systematic Encoding

Systematic encoding algorithm for an (n,k)

Systematic encoding algorithm for an (n,k)

Cyclic code:

Cyclic code:

1.

1.

Multiply the

Multiply

the message

message polynomial

polynomial

by 

by 

2.

2.

Divide the result of Step 1 by the generator

Divide the result of Step 1 by the generator

polynomial

polynomial

.

. Let

Let

be

be the

the remainder.

remainder.

3.

3.

 

 

Add

Add

to

to

to

to form

form the

the codeword

codeword

))

((

 X  X  ii  X  X nn−−k k 

))

((

 X  X 

g

g

r r 

((

 X  X 

))

))

((

 x x ii  X   X nn−−k k 

))

((

 X  X  C  C 

))

((

 X  X  r  r 

(9)

Implementation

Implementation

The hardware to implement this algorithm is a shift

The hardware to implement this algorithm is a shift

register and a collection of modulo

register and a collection of modulo two adders.

two adders.

The number of shift register positions is equal to the

The number of shift register positions is equal to the

degree of the divisor, G(X), and the dividend is shifted

degree of the divisor, G(X), and the dividend is shifted

through high order first and left to right.

(10)

Circuit for encoding systematic cyclic codes

Circuit for encoding systematic cyclic codes

x

x WWe noticed earlier that e noticed earlier that cyclic codes can cyclic codes can be generated by using be generated by using shift registersshift registers

whose feedback coefficients are determined directly by the generating whose feedback coefficients are determined directly by the generating  polynomial

(11)

Example

Example

(12)

Decoding cyclic codes

Decoding cyclic codes

Every valid, received code wordEvery valid, received code word (p)(p) must be a multiple of must be a multiple of GG(p),(p), otherwiseotherwise

an error has occurred. (Assume that the probability of noise to convert code an error has occurred. (Assume that the probability of noise to convert code words to other code words is very small.)

words to other code words is very small.)

Therefore dividing theTherefore dividing the (p)/ (p)/ GG(p)(p) and considering the remainder as aand considering the remainder as a

syndrome can reveal if an error

syndrome can reveal if an error has happened and sometimes also to reveal inhas happened and sometimes also to reveal in which bit (depending on code strength)

which bit (depending on code strength)

Division is accomplished by a shift registersDivision is accomplished by a shift registers

The error syndrome of q=The error syndrome of q=n-k n-k bits is thereforebits is therefore

[ [

]]

(( ))

p

p

==

m

mo

od

d

(( )) //

p

p

(( ))

p

p

S

(13)

Decoding cyclic codes: error correction

(14)

Decoding circuit for (7,4) code

Decoding circuit for (7,4) code

syndrome computation

syndrome computation

x

x To start with, the switch is at “0” positionTo start with, the switch is at “0” position

x

x Then shift register is stepped until all the received code bits have entered theThen shift register is stepped until all the received code bits have entered the

register  register  x

x This results is a 3-bit syndrome (This results is a 3-bit syndrome (nn -- k k = 3 ):= 3 ):

that is then left to the register  that is then left to the register  x

x Then the switch is turned to the position “1” that drives the syndrome out of Then the switch is turned to the position “1” that drives the syndrome out of thethe

register  register 

[ [

]]

(( ))

p

p

==

m

mo

od

d

(( )) //

p

p

(( ))

p

p

S

S

R

R

G

G

(15)

Decoding

Decoding

(16)

 Encoder and Decoder 

(17)

 Advantages of Cyclic codes

 Advantages of Cyclic codes

Simplified encoding.

Simplified encoding.

Easy syndrome calculation S(p) =

Easy syndrome calculation S(p) = rem{Y(p)/G(p)}

rem{Y(p)/G(p)}

Ingenious error correcting decoding methods have been

Ingenious error correcting decoding methods have been devised for 

devised for 

specific cyclic codes. They eliminate the storage needed for t

specific cyclic codes. They eliminate the storage needed for table

able

lookup.

lookup.

Cyclic Redundancy Co

Cyclic Redundancy Codes (CRC), a class of cyclic

des (CRC), a class of cyclic codes, has ability to

codes, has ability to

detect burst errors of length ‘q’, all

detect burst errors of length ‘q’, all single bit errors, any odd number of 

single bit errors, any odd number of 

errors if (p+1) is a factor

errors if (p+1) is a factor of G(p), Double errors if G(p) has at

of G(p), Double errors if G(p) has at least

least

three 1’s.

three 1’s.

Cyclic codes for error detection provides high efficiency and the ease of 

Cyclic codes for error detection provides high efficiency and the ease of 

implementation.

implementation.

(18)

Some block codes that can be realized by cyclic codes

Some block codes that can be realized by cyclic codes

(n,1)(n,1) Repetition codesRepetition codes. High coding gain (minimum . High coding gain (minimum distance alwaysdistance always n

n--1), but very low rate: 1/ 1), but very low rate: 1/nn

(n,k)(n,k) Hamming codesHamming codes. Minimum distance always 3. Thus can detect 2. Minimum distance always 3. Thus can detect 2

errors and correct one error.

errors and correct one error. n=2n=2mm-1, k = n - m,-1, k = n - m,

Maximum-length codesMaximum-length codes. For every integer there exists a . For every integer there exists a maximummaximum

length code (

length code (n,k n,k ) with) with n = 2n = 2k k - 1,d - 1,d  m

miinn = 2= 2kk--11 ..

BCH-codesBCH-codes. For every integer there exist a . For every integer there exist a code withcode with nn = 2= 2mm-1,-1,

and where

and where t t is the error correction capabilityis the error correction capability

((n,k n,k )) Reed-Solomon (RS) codesReed-Solomon (RS) codes. Works with. Works with k symbolssymbols that consists of that consists of 

m

m bits that are encoded to yield code words of bits that are encoded to yield code words of nn symbolssymbols..

 Nowadays BCH and RS are very popular due to large Nowadays BCH and RS are very popular due to large d d mmiinn , large number , large number  of codes, and easy generation

of codes, and easy generation

Code selection criteria: number of codes, correlation properties, codeCode selection criteria: number of codes, correlation properties, code

gain, code rate, error

(19)

Reference:

Reference:

1.

1.

Communication

Communication Systems

Systems by

by R.P

R.P Singh

Singh ,

, S.D

S.D Sapre

Sapre

2.

2.

Information Theory , Coding and Cryptography by Ranjan Bose

Information Theory , Coding and Cryptography by Ranjan Bose

3. 3.

http://www.cs.nmsu.edu/~pfeiffer/

http://www.cs.nmsu.edu/~pfeiffer/

4. 4.

http://web.syr.edu/~rrosenque/ecc/cyclic.htm

http://web.syr.edu/~rrosenque/ecc/cyclic.htm

5. 5.

http://www.microconsultants.com/tips/crc/crc.txt

http://www.microconsultants.com/tips/crc/crc.txt

(20)

References

Related documents

Several studies have shown the acute effects of single or multiple doses of MDMA on learning and memory [4-5] , but in our knowledge, no studies have examined the difference

Depending on the type of climatology and gridded fields, two different background fields were used: (a) a climatic seasonal field to account for seasonality from the original data,

Commission Staff agrees with commenters that the proposed performance metrics for non-ISO/RTO regions should provide a suitable basis for comparing the performance of ISOs, RTOs

In the present paper we study the peculiarities of changes in the absorption and the PL spectra of colloidal solution of the CdSe nanoparticles occurring under

The Kingston Centre is less than a ten-minute drive from Morton Park and offers an array of High Street stores including Marks &amp; Spencer and Next as well as a host of coffee

For this, you should scan an eicar.com, for example, to see if the scanner reports it properly (check the report file for the virus name) and the exit (error) code matches the

Based on an extensive review of urban sustainability assessment frameworks and ontology development methodologies, the Urban District Sustainability Assessment

The focal inducements are all likely to be of key importance in managing talent obligations: Psychological contract fulfilment because talent are likely to be