(7,4) Hamming code - can correct one error, rate = 4/7 = 0.57

*Encoding:*

- the data is encoded 4 bits at a time:
*d*=*d*_{1}*d*_{2}*d*_{3}*d*_{4} - 3 parity check bits are added:
*p*=*p*_{1}*p*_{2}*p*_{3} - the final codeword is:
*c*=*p*_{1}*p*_{2}*p*_{3}*d*_{1}*d*_{2}*d*_{3}*d*_{4} - Example:
- this operation can be written in matrix form as:

*Decoding:*

- the parity check matrix H is used:

- if the received data is
*r*, then compute - find the
*e*that corresponds to*s*in the following table:

- the corrected output is:
- The original data are the last 4 bits of
*c* - Example:
*d*=1011 ->*c*=1001011, ->*d*=1011 - if the raw BER is 10
^{-6}, the BER after error correction is: