Example
Take for g the polynomial X3 + X + 1 in Z/2Z[X. It divides X7 - 1 and accordingly we consider the binary cyclic code of length 7 generated by g.
According to the BCH bound, the minimum distance of the code C generated by g is at least 3.
Indeed, if a is the residue class of X in Z/2Z[X]/(X7 - 1), then both a and a2 are roots of g. Note that 3 is exactly the minimum distance of C.