ArticleslgStudy

science

Cyclic code

Cyclic code is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Cyclic code rather than just read about it. In short: In coding theory, a cyclic code is a block code, where the circular shifts of each codeword gives another word that belongs to the code. They are error-correcting codes that have algebraic properties that are convenient for efficient error detection and correction.

Cyclic code — main illustration
Cyclic code — illustration

Key takeaways

  • Cyclic code belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Cyclic code to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Cyclic code from memory before moving on to harder problems.

Reference excerpt

In coding theory, a cyclic code is a block code, where the circular shifts of each codeword gives another word that belongs to the code. They are error-correcting codes that have algebraic properties that are convenient for efficient error detection and correction.

Definition Let 𝒞 be a linear code over a finite field (also called Galois field) GF(q) of block length n. 𝒞 is called a cyclic code if, for every codeword c=(c1,…,cn) from 𝒞, the word (cn,c1,…,cn−1) in GF(q)n obtained by a cyclic right shift of components is again a codeword. Because one cyclic right shift is equal to n−1 cyclic left shifts, a cyclic code may also be defined via cyclic left shifts. Therefore, the linear code 𝒞 is cyclic precisely when it is invariant under all cyclic shifts. Cyclic codes have some additional structural constraint on the codes. They are based on Galois fields and because of their structural properties they are very useful for error controls. Their structure is strongly related to Galois fields because of which the encoding and decoding algorithms for cyclic codes are computationally efficient.

Algebraic structure Cyclic codes can be linked to ideals in certain rings. Let R=A[x]/(xn−1) be a quotient of a polynomial ring over the finite field A=GF(q). Identify the elements of the cyclic code 𝒞 with polynomials in R such that (c0,…,cn−1) maps to the polynomial c0+c1x+⋯+cn−1xn−1: thus multiplication by x corresponds to a cyclic shift. Then 𝒞 is an ideal in R, and hence principal, since R is a principal ideal ring. The ideal is generated by the unique monic element in 𝒞 of minimum degree, the generator polynomial g. This must be a divisor of xn−1. It follows that every cyclic code is a polynomial code. If the generator polynomial g has degree d then the rank of the code 𝒞 is n−d. If 𝒞 is a cyclic code, the dual code 𝒞⊥ is also a cyclic code. The generator polynomial h(x) for 𝒞⊥ is also called the parity-check polynomial or simply check polynomial for 𝒞. It can also be shown that g(x)h∗(x)=xn−1, where h∗(x) denotes the reciprocal polynomial of h(x). The idempotent of 𝒞 is a codeword e such that e2=e (that is, e is an idempotent element of 𝒞) and e is an identity for the code, that is e⋅c=c for every codeword c. If n and q are coprime such a word always exists and is unique; it is a generator of the code. An irreducible code is a cyclic code in which the code, as an ideal is irreducible, i.e. is minimal in R, so that its check polynomial is an irreducible polynomial.

Examples For example, if A=𝔽2 and n=3, the set of codewords contained in the cyclic code generated by (1,1,0) is precisely {(0,0,0),(1,1,0),(0,1,1),(1,0,1)}. This code corresponds to the ideal in 𝔽2[x]/(x3−1) generated by (1+x). The polynomial (1+x) is irreducible in the polynomial ring, and hence the code is an irreducible code. The idempotent of this code is the polynomial x+x2, corresponding to the codeword (0,1,1).

Trivial examples Trivial examples of cyclic codes are An itself and the code containing only the zero codeword. These correspond to generators 1 and xn−1 respectively: these two polynomials must always be factors of xn−1. Over GF(2) the parity bit code, consisting of all words of even weight, corresponds to generator x+1. Again over GF(2) this must always be a factor of xn−1.

Other examples Many types of commonly used error-correcting codes can be represented as cyclic codes, including BCH codes, Reed-Solomon codes, and some classes of low-density parity-check codes defined from finite geometries.

For correcting errors Cyclic codes can be used to correct errors, like Hamming codes as cyclic codes can be used for correcting single error. Likewise, they are also used to correct double errors and burst errors. All types of error corrections are covered briefly in the further subsections. The (7,4) Hamming code has a generator polynomial g(x)=x3+x+1. This polynomial has a zero in Galois extension field GF(8) at the primitive element α, and all codewords satisfy 𝒞(α)=0. Cyclic codes can also be used to correct double errors over the field GF(2). Blocklength will be n equal to 2m−1 and primitive elements α and α3 as zeros in the GF(2m) because we are considering the case of two errors here, so each will represent one error. The received word is a polynomial of degree n−1 given as v(x)=a(x)g(x)+e(x) where e(x) can have at most two nonzero coefficients corresponding to 2 errors. We define the syndrome polynomial, S(x) as the remainder of polynomial v(x) when divided by the generator polynomial g(x) i.e. S(x)≡v(x)≡(a(x)g(x)+e(x))≡e(x)modg(x) as (a(x)g(x))≡0modg(x).

For correcting two errors Let the field elements X1 and X2 be the two error location numbers. If only one error occurs then X2 is equal to zero and if none occurs both are zero. Let S1=v(α) and S3=v(α3). These field elements are called "syndromes". Now because g(x) is zero at primitive elements α and α3, so we can write S1=e(α) and S3=e(α3). If say two errors occur, then S1=αi+αi′ and S3=α3i+α3i′. And these two can be considered as two pair of equations in GF(2m) with two unknowns and hence we can write S1=X1+X2 and S3=(X1)3+(X2)3. Hence if the two pair of nonlinear equations can be solved cyclic codes can used to correct two errors.

Hamming code The Hamming(7,4) code may be written as a cyclic code over GF(2) with generator 1+x+x3. In fact, any binary Hamming code of the form Ham(r, 2) is equivalent to a cyclic code, and any Hamming code of the form Ham(r,q) with r and q-1 relatively prime is also equivalent to a cyclic code. Given a Hamming code of the form Ham(r,2) with r≥3, the set of even codewords forms a cyclic [2r−1,2r−r−2,4]-code.

… excerpt ends here. Continue reading the full article.

Illustrations

Cyclic code: If 00010111 is a valid codeword, applying a right circular shift gives the string 10001011. If the code is cyclic, then 10001011 is again a valid codeword. In general, applying a right circular shift moves the least significant bit (LSB) to the leftmost position, so that it becomes the most significant bit (MSB); the other positions are shifted by 1 to the right.
If 00010111 is a valid codeword, applying a right circular shift gives the string 10001011. If the code is cyclic, then 10001011 is again a valid codeword. In general, applying a right circular shift moves the least significant bit (LSB) to the leftmost position, so that it becomes the most significant bit (MSB); the other positions are shifted by 1 to the right.

Worked examples

Example 1 — a first encounter with Cyclic code

Start with the simplest possible case. Write down what Cyclic code claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Cyclic code before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Cyclic code ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Cyclic code

In research
Cyclic code appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Cyclic code in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Cyclic code is common in secondary-school and first-year university syllabi. It links to neighbouring topics Coding theory, Finite fields, so understanding it makes those chapters shorter.
In everyday life
Look for Cyclic code outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Cyclic code” →

How to study Cyclic code in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Cyclic code means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Cyclic code out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Cyclic code in simple terms?

In coding theory, a cyclic code is a block code, where the circular shifts of each codeword gives another word that belongs to the code. They are error-correcting codes that have algebraic properties that are convenient for efficient error detection and correction.

Why does Cyclic code matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Cyclic code?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Cyclic code.

Tags

  • Coding theory
  • Finite fields

Keep exploring