The Hamming (7,4) code is the binary Hamming code , with code parameters
. It encodes four data bits in a seven-bit
codeword and corrects any single-bit error. One parity
check matrix is
whose columns are the seven nonzero vectors in the three-dimensional vector space over the two-element finite field. The
codewords are the vectors satisfying
The code has minimum Hamming distance 3 and is a perfect code.
With the displayed column order, a nonzero syndrome identifies a single error
at position
. For example,
is column 6, so the sixth bit is flipped to recover
the transmitted codeword, assuming at most one bit was
changed.