Meaning and assumptions
Hamming(7,4) adds three parity bits to four data bits. Overlapping parity groups give every single-bit error a distinct syndrome. Under the explicit assumption of at most one bit error, the syndrome identifies the position to correct.[1]
Even parity; positions numbered left-to-right1through7. Parity bits occupy1,2,4; data bits3,5,6,7. Read syndrome as(s4s2s1)2. Other arrangements are valid, but parity matrix, encoder and decoder must use the same convention.[1]
Why the approach works
For data(d1, d2, d3, d4), setb3=d1, b5=d2, b6=d3, b7=d4. Even parity requires b1=d1⊕d2⊕d4, b2=d1⊕d3⊕d4, b4=d2⊕d3⊕d4. On reception, recompute parity XORs including received parity bits. A valid word has zero syndrome; a single error atj produces binaryj, because columnj of the check matrix is that number. Multiple errors can mimic another single error. Standard Hamming therefore cannot reliably correct two errors; SECDED needs an extra overall parity bit and appropriate decision logic.[1]
Two complete worked examples
Encode data1011
- Given
- d1d2d3d4=1011; even parity and positions as defined above.
- Find
- The transmitted codeword is0110011.
Insert data at3,5,6,7.
Calculate the three parity bits.
Assemble positions1through7.
Result: The transmitted codeword is0110011.
Check: Groups1,3,5,7;2,3,6,7;4,5,6,7 each contain an even number of ones. All three XOR sums are zero.
An error at position5
- Given
- Received word0110111. At most one bit is wrong.
- Find
- Correcting position5 restores data1011.
Calculate the three XOR checks.
Read syndrome with the agreed bit significance.
Flip only the indicated bit and read data positions.
Result: Correcting position5 restores data1011.
Check: All checks vanish after correction. Under the single-error assumption this confirms recovery; without it, another valid word could have been transmitted.
Recall the method later with the formula’s flashcards.
10 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Five exercises with solutions
Calculate · Application
Encode0001 using the stated even parity.
Show hint
State the approach and assumptions before substituting.
Learning goal: Encode0001 using the stated even parity.
Show solution and calculation
b3=0, b5=0, b6=0, b7=1.
Thusb1=b2=b4=1.
Codeword1101001.
Calculate · Application
Received word0001000; at most one error. Find syndrome and correction.
Show hint
State the approach and assumptions before substituting.
Learning goal: Received word0001000; at most one error. Find syndrome and correction.
Show solution and calculation
s1=0, s2=0, s4=1, soj=4.
Flipping position4 gives0000000 and data0000.
Interpret · Application
Why does syndrome000 alone not prove error-free transmission without an error model?
Show hint
State the approach and assumptions before substituting.
Learning goal: Why does syndrome000 alone not prove error-free transmission without an error model?
Show solution and calculation
Several errors can transform one valid codeword into another.
Syndrome000 proves only that the received word satisfies the check equations.
Error analysis · Application
Starting from the zero codeword, bits1and2 flip. A single-error decoder indicates position3. Why is flipping it wrong?
Show hint
State the approach and assumptions before substituting.
Learning goal: Starting from the zero codeword, bits1and2 flip. A single-error decoder indicates position3. Why is flipping it wrong?
Show solution and calculation
The error indices XOR:1⊕2=3.
The decoder then produces1110000, a different valid word rather than0000000.
It was used outside the single-error assumption.
Transfer · Challenge
What is the data rate and additional capability of the usual8,4 SECDED extension?
Show hint
State the approach and assumptions before substituting.
Learning goal: What is the data rate and additional capability of the usual8,4 SECDED extension?
Show solution and calculation
Rate4/8=1/2.
Extra overall parity and correct decoding combine single-error correction with double-error detection; two errors are not generally corrected.
Check your understanding with the formula’s reference test.
6 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Related next steps
Related foundations: Hamming distance between bit strings, CRC checksum as a polynomial remainder over GF(2).
Sources for this explanation
Quanta · Updated November 6, 2026
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Locally authored DE/EN article with two original examples, five exercises, model limits and a native diagram.
Cite this reference page
Quanta. Hamming(7,4): encoding and syndrome decoding. Updated November 6, 2026. https://quanta-study.de/en/formula-sheet/hamming-code-fehlerkorrektur
When citing a specific scientific statement, also cite the specialist source linked to that statement.