Next: Equivalent codes
Up: The Hamming metric
Previous: -codes and error correction
  Contents
  Index
The binary Hamming
code
Let
and let
be the set of
all vectors in the third column below
(for simplicity, we write
instead of
, for example).
| decimal |
binary |
hamming (7,4) |
| 0 |
0000 |
0000000 |
| 1 |
0001 |
0001110 |
| 2 |
0010 |
0010101 |
| 3 |
0011 |
0011011 |
| 4 |
0100 |
0100011 |
| 5 |
0101 |
0101101 |
| 6 |
0110 |
0110110 |
| 7 |
0111 |
0111000 |
| 8 |
1000 |
1000111 |
| 9 |
1001 |
1001001 |
| 10 |
1010 |
1010010 |
| 11 |
1011 |
1011100 |
| 12 |
1100 |
1100100 |
| 13 |
1101 |
1101010 |
| 14 |
1110 |
1110001 |
| 15 |
1111 |
1111111 |
This is a linear code of length
, dimension
, and minimum distance
. It is called the
Hamming
-code.
In fact, there is a mapping from
to
given by
,
where
A basis for
is given by the vectors
,
,
,
.
Therefore, the matrix
is a generating matrix.
An algorithm for decoding the
Hamming
code
Denote the received word by
.
- Put
in region
of the Venn diagram above,
.
- Do parity checks on each of the circles
,
,
and
.
| parity failure region(s) |
error position |
| none |
none |
| A, B, and C |
1 |
| B and C |
2 |
| A and C |
3 |
| A and B |
4 |
| A |
5 |
| B |
6 |
| C |
7 |
Next: Equivalent codes
Up: The Hamming metric
Previous: -codes and error correction
  Contents
  Index
David Joyner
2002-08-23