Let be the matrix whose columns are the distinct nonzero vectors of . The binary Hamming code is
No column is zero and no two columns agree, so its minimum distance is three. A radius-one Hamming ball contains
words, while . The radius-one balls about codewords are disjoint and their total size is , so they partition the ambient space. Hence is a perfect code.
Let the received word be all ones except in the last coordinate. The sum of all nonzero vectors of is zero for , so its syndrome is the last column of . Minimum-distance decoding therefore flips the last bit and returns the all-one word. A Hamming code corrects every single error because each nonzero syndrome identifies its unique erroneous coordinate.
The original binary Hamming code has parameters , so it has codewords. Its minimum distance three makes the radius-one balls about its codewords disjoint. Each ball has
vectors, and , the size of the ambient space. Equality in the Hamming bound therefore shows that these balls partition : the code is perfect.
The Mariner code is with parameters . Its information rate is , and it corrects
errors, a proportion of a codeword. The binary Hamming code of length has parameters : its rate is much higher, but it corrects only one error, a proportion .