Hamming Codes
Used to detect 1 Bit Errors and fix them. Single parity bit can detect an error but cannot be fixed. Hamming codes use multiple parity bits to detect if there is an error and where that error occurs.
No. of parity bits required scales logarithmically over no. of bits. So this scheme is efficient for large codewords of transfers.
Amount of parity bits () required:
- is the number of data (message) bits.
- is the number of parity bits.
- The right-hand side counts the situations the receiver must tell apart: "no error", or "error in one of the positions".
- The parity checks give possible patterns, so there must be at least that many patterns.
(7,4) SEC Hamming Code
7 Bits, 4 Message Bits Single Error Correcting Hamming Code

-
Parity bits are always inserted into places where only One bit is indicating the bit position. Which are reason: We do not want the parity bit values of one bit to change another parity bit value.
-
Other positions hold message bit values
-
Each parity bit checks only the positions there are s in the position bits in its row. Value of each position will be used to calculate the value of parity bit. Example: checks bit positions checks bit positions checks bit positions So Each bit position is checked by at least two parity bits. If two parity bits are wrong, we know which position that is. If all three parity bits are wrong, that is position
