Identify a binary word with its coefficient polynomial in . A cyclic code is exactly an ideal of : closure under multiplication by is closure under cyclic shift. Its inverse image in the principal ideal domain has a unique monic generator polynomial of a cyclic code dividing . Put
The cubics have no root in , hence are irreducible polynomials. The eight monic divisors yield all binary cyclic codes of length seven. A code generated by has basis and dimension , with the zero code treated separately.
For the dual of a cyclic code, let . Orthogonality of coefficient vectors to all cyclic shifts gives the generator . Here . Thus the complete pairing, with the respective dimensions, is
These are respectively the whole-space/zero, even-weight/repetition, and two Hamming code/binary simplex code pairs. The reciprocal formula follows because the product of a word polynomial and the reversed polynomial of an orthogonal word has zero coefficients in all cyclic positions; the resulting inclusion has the correct complementary dimension, hence is equality.
Over , subtraction equals addition. The polynomial has the factorization
The two cubic factors have no root in , so they are irreducible, and they are reciprocal to one another. Put
Every cyclic code corresponds to one monic divisor of . The complete list is
Thus the two cubic generators give the two cyclic coordinate orientations of Hamming's code. Their duals have generators and and are the simplex codes. The remaining four are the familiar whole-space, even-weight, repetition, and zero codes. This is the complete classification of binary cyclic codes of length seven.