Error-Correcting Codes Simulator

Geometric Constraints for Error Detection & Correction

Message Length: 4
Code Word Length: 7
Overhead: 75%
Errors Detected: 0
Errors Corrected: 0
BER: 0.000

Encoding Process

Message:
_ _ _ _
Parity Bits:
_ _ _
Code Word:
_ _ _ _ _ _ _
Enter a message and click "Encode" to see how parity bits are calculated.

Code Space Visualization

Valid Code Word
Invalid Word
Received Word
Corrected Word

Channel Transmission

Sent:
_ _ _ _ _ _ _
Received:
_ _ _ _ _ _ _
Errors:
_ _ _ _ _ _ _
Click "Transmit" to simulate channel noise and bit flips.

Decoding Process

Syndrome:
_ _ _
Error Position: -
Corrected:
_ _ _ _ _ _ _
Decoded Message:
_ _ _ _
Click "Decode" to see how errors are detected and corrected using syndrome calculation.

How Error-Correcting Codes Work

Geometric Constraints

Error-correcting codes add redundancy using geometric constraints. Valid code words occupy specific positions in a constrained subspace. When errors occur, the received word "violates" these constraints, allowing detection and correction.

Hamming Distance

The Hamming distance between two code words is the number of bit positions where they differ. A code can detect up to d-1 errors and correct up to ⌊(d-1)/2⌋ errors, where d is the minimum Hamming distance between any two valid code words.

Parity Constraints

Each parity bit enforces a constraint: the sum of bits in specific positions must be even (or odd). When constraints are violated, the pattern of violations (syndrome) identifies the error location.

Code Types

  • Hamming(7,4): 4 data bits + 3 parity bits = 7 total. Can correct 1 error.
  • Hamming(15,11): 11 data bits + 4 parity bits = 15 total. Can correct 1 error.
  • Repetition(3,1): Repeat each bit 3 times. Majority vote decoding.
  • Simple Parity: Add 1 parity bit. Can detect 1 error, cannot correct.