Hamming Code Calculator
Generate a Hamming (7,4) code from four data bits and detect or correct a single-bit transmission error.
About the Hamming code calculator
Hamming code examples
| Data or received code | Result | Explanation |
|---|---|---|
| Data 1011 | 0110011 | Parity bits are 0, 1, and 0. |
| Data 1101 | 1010101 | Parity bits are 1, 0, and 0. |
| Received 0010101 | Error at position 1 | Flipping the first bit restores 1010101. |
How to use the Hamming code calculator
- Enter exactly four binary data bits without spaces or separators.
- Optionally enter a received seven-bit codeword to check it for a transmission error.
- Select Calculate Hamming Code to generate the even-parity codeword.
- Review the syndrome result and corrected code when a received word was provided.
Hamming code FAQ
What does Hamming (7,4) mean?
The codeword contains seven bits in total and carries four original data bits. The other three bits provide parity information for error correction.
Which parity convention does this calculator use?
It uses even parity for all three parity groups. A valid checked group therefore contains an even number of one bits.
How does the syndrome locate an error?
Each failed parity check contributes one binary place value to the syndrome. The combined value equals the one-based position of a single erroneous bit.
Can Hamming (7,4) correct two errors?
No, it is designed to correct one changed bit per codeword. Two changed bits can produce a misleading syndrome and should not be treated as safely correctable.
Where are Hamming codes used?
They are used to teach coding theory and appear in memory, communication, and storage designs. Real systems often use extended or more powerful codes depending on their reliability requirements.