Hamming code is a forward error correction (FEC) scheme which can be used to detect and correct bit errors. The error correction bits are known as Hamming bits and the number that need to be added to a data symbol is determined by the expression:
\(2^n >= (m + n + 1)\)
where m is number of bits in the data symbol and n is number of Hamming bits
Hamming bits are inserted into the message character as desired. Typically, they are added at positions that are powers of 2, i.e. the 1st, 2nd, 4th, 8th, 16th bit positions, and so on. For example to code the character 011001 then, starting from the right-hand side, the Hamming bits would be inserted into the 1st, 2nd, 4th and 8th bit positions. This page simulates a single bit error.