# Generator polynomial

I need to compute a generator polynomial for a binary cyclic code of length 12 and dimension 5. I know that factorization of $(x^{12}+1)$ over $GF(2)$ is $(x+1)^4(x^2+x+1)^4$. What will be next step?

Is it possible this process? I know that factorization of $(x^{12}+1)$ is $(x+1)^4(x^2+x+1)$ and I need to find the product of factor of degree $n-k$ (in this case 7). So the generator polynomial can be $x^7+x^5+x^4+x^3+x^2+x+1$. Is it true? Can I get a parity check polynomial from this generator polynomial? –  James Oct 16 '12 at 6:25
Linear binary cyclic codes of length 12 are ideals of the quotient ring $\mathbb{F}_2[x]/(x^{12}-1)$. Since this ring is a principal ideal ring, each ideal has the form $(f(x))$ where $f(x)$ divides $x^{12}-1$. In order to have a 5 dimensional code, you will need an $f(x)$ with degree $12-5=7$.
You have already factored $x^{12}-1=x^{12}+1$. Now you just have to find all possible ways to get a divisor of $x^{12}+1$ with degree 7.
Let $p(x)=x+1$ and $q(x)=x^2+x+1$. Check that $p(x)^3q(x)^2$ and $p(x)q(x)^3$ are the only possibilities.