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.