Hamming Code Calculator

Generate Hamming(7,4) error-correcting code for 4-bit data.
Calculator
Enter your values
Analysis
Interpretation of the current calculator output

Enter values to see detailed analysis and insights.

How to Use

Step-by-step instructions
  1. 1Enter 4 bits of data (e.g., 1011).
  2. 2The calculator will generate the 7-bit Hamming code.

Hamming(7,4)

Adds 3 parity bits to 4 data bits to allow correction of single-bit errors.
Code = p1 p2 d1 p4 d2 d3 d4

Variables:

p1Parity for bits 1, 3, 5, 7
p2Parity for bits 2, 3, 6, 7
p4Parity for bits 4, 5, 6, 7

Example

Data 1011

Inputs:

Data:1011

Steps:

  1. 1.d1=1, d2=0, d3=1, d4=1
  2. 2.p1 = (1+0+1)%2 = 0
  3. 3.p2 = (1+1+1)%2 = 1
  4. 4.p4 = (0+1+1)%2 = 0
  5. 5.Code = 0110011
Result:
0110011

Frequently Asked Questions

What errors can it fix?

Hamming(7,4) can detect and correct any single-bit error. It can detect (but not correct) double-bit errors.