Generating a check matrix includes defining a generator function operable
to yield check bits associated with a word. A set of primitive elements
is calculated from the generator function. A set of check matrix columns
is generated, where each check matrix column includes a matrix having a
subset of the set of primitive elements. A check matrix is generated from
a subset of the set of check matrix columns, where the check matrix
yields a syndrome that comprises an error pattern for the word. The check
matrix is reported.