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.
Let be a linear code over a finite field (also called Galois field) of block length n. is called a cyclic code if, for every codeword c=(c1,...,cn) from C, the word (cn,c1,...,cn-1) in 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.