The block length of a Hamming code is given by
For
bits, we have
parity bits and
information bits.
Here , , and . We begin with the parity-check matrix
for
the systematic Hamming code. This matrix has
rows and
columns. The
first
columns are specified as the
identity matrix. The
remaining
columns consist of nonzero binary vectors of length .
The form for the parity-check matrix for a systematic code is
The generator matrix
for the systematic code is
For all Hamming codes,
. We can use that code to correct a
single error. The codes may be decoded using a syndrome table. For the error
vector with its error in the th column of , the corresponding
syndrome is the th row of
If we count bit positions in the error vector from left to right, starting
with 1, this position corresponds to the number obtained from reading the
symdrome from right to left, with the exception of syndromes 001 and 110.
The code vector formed by
are of the form
And the parity generator has the following implementation:
We recalculate the parity bits and compare them to the parity bits received:
There is a one-to-one mapping between the altered bit and the binary value
of
:
So that the following implementation points out the erronerous bits: