phanerozoic / threshold-hamming74decoder

huggingface.co
Total runs: 10
24-hour runs: 0
7-day runs: 2
30-day runs: 6
Model's Last Updated: January 23 2026

Introduction of threshold-hamming74decoder

Model Details of threshold-hamming74decoder

threshold-hamming74decoder

Hamming(7,4) decoder with single-error correction. Takes a 7-bit codeword (possibly corrupted) and outputs the corrected 4 data bits.

Circuit Overview
c1 c2 c3 c4 c5 c6 c7
 │  │  │  │  │  │  │
 └──┴──┴──┴──┴──┴──┴─────────────────────┐
 │  │  │  │  │  │  │                     │
 ▼  ▼  ▼  ▼  ▼  ▼  ▼                     │
┌─────────────────────┐                  │
│  Syndrome Computer  │                  │
│  s1 = c1⊕c3⊕c5⊕c7  │                  │
│  s2 = c2⊕c3⊕c6⊕c7  │                  │
│  s3 = c4⊕c5⊕c6⊕c7  │                  │
└─────────────────────┘                  │
         │ s1,s2,s3                      │
         ▼                               │
┌─────────────────────┐                  │
│  Error Locator      │                  │
│  flip3 = s1∧s2∧¬s3  │   ┌──────────────┘
│  flip5 = s1∧¬s2∧s3  │   │ c3,c5,c6,c7
│  flip6 = ¬s1∧s2∧s3  │   │
│  flip7 = s1∧s2∧s3   │   │
└─────────────────────┘   │
         │                │
         ▼                ▼
┌─────────────────────────────┐
│  Corrector                  │
│  d1 = c3 ⊕ flip3            │
│  d2 = c5 ⊕ flip5            │
│  d3 = c6 ⊕ flip6            │
│  d4 = c7 ⊕ flip7            │
└─────────────────────────────┘
         │
         ▼
    d1 d2 d3 d4
Decoding Algorithm

Step 1: Compute Syndrome

The syndrome is a 3-bit value that indicates the error position:

s3 s2 s1 Decimal Meaning
0 0 0 0 No error
0 0 1 1 Error in c1 (parity)
0 1 0 2 Error in c2 (parity)
0 1 1 3 Error in c3 (d1)
1 0 0 4 Error in c4 (parity)
1 0 1 5 Error in c5 (d2)
1 1 0 6 Error in c6 (d3)
1 1 1 7 Error in c7 (d4)

Step 2: Locate and Correct

Only data positions (3, 5, 6, 7) need correction in the output. Parity bit errors (positions 1, 2, 4) don't affect data extraction.

Step 3: Extract Data

Data bits are at positions 3, 5, 6, 7 of the codeword, XORed with their flip signals.

4-Way XOR Implementation

Each syndrome bit requires a 4-input XOR:

XOR(a,b,c,d) = XOR(XOR(a,b), XOR(c,d))

    a   b       c   d
    │   │       │   │
    └─┬─┘       └─┬─┘
      ▼           ▼
   ┌─────┐     ┌─────┐
   │ XOR │     │ XOR │   Layer 1-2
   └─────┘     └─────┘
      │           │
      └─────┬─────┘
            ▼
         ┌─────┐
         │ XOR │         Layer 3-4
         └─────┘
            │
            ▼
      XOR(a,b,c,d)
Architecture
Stage Component Neurons Layers
Syndrome 3 × 4-way XOR 18 4
Error Locator 4 detectors 4 1
Corrector 4 × 2-way XOR 12 2
Total 34 6

Note: Syndrome computation and final XOR stages run in parallel where possible.

Error Correction Examples
Original:     1011 → encode → 0110011
Corrupted:    0110011 → flip bit 5 → 0110111
Syndrome:     s1=1, s2=0, s3=1 → position 5
Corrected:    d1=1, d2=0, d3=1, d4=1 ✓

Original:     0000 → encode → 0000000
Corrupted:    0000000 → flip bit 7 → 0000001
Syndrome:     s1=1, s2=1, s3=1 → position 7
Corrected:    d1=0, d2=0, d3=0, d4=0 ✓
Limitations
  • Corrects single-bit errors only
  • Detects double-bit errors (non-zero syndrome, wrong correction)
  • Cannot distinguish 2-bit errors from 1-bit errors

For stronger protection, use Hamming(7,4) + overall parity (SECDED).

Usage
from safetensors.torch import load_file

w = load_file('model.safetensors')

def hamming74_decode(codeword):
    """Decode 7-bit Hamming codeword to 4 data bits with error correction"""
    # See model.py for full implementation
    pass

# Received corrupted codeword (error at position 3)
received = [0, 1, 0, 0, 0, 1, 1]  # Should be [0,1,1,0,0,1,1]
data = hamming74_decode(received)
# Returns [1, 0, 1, 1] (corrected)
Files
threshold-hamming74decoder/
├── model.safetensors
├── model.py
├── config.json
└── README.md
License

MIT

Runs of phanerozoic threshold-hamming74decoder on huggingface.co

10
Total runs
0
24-hour runs
1
3-day runs
2
7-day runs
6
30-day runs

More Information About threshold-hamming74decoder huggingface.co Model

More threshold-hamming74decoder license Visit here:

https://choosealicense.com/licenses/mit

threshold-hamming74decoder huggingface.co

threshold-hamming74decoder huggingface.co is an AI model on huggingface.co that provides threshold-hamming74decoder's model effect (), which can be used instantly with this phanerozoic threshold-hamming74decoder model. huggingface.co supports a free trial of the threshold-hamming74decoder model, and also provides paid use of the threshold-hamming74decoder. Support call threshold-hamming74decoder model through api, including Node.js, Python, http.

threshold-hamming74decoder huggingface.co Url

https://huggingface.co/phanerozoic/threshold-hamming74decoder

phanerozoic threshold-hamming74decoder online free

threshold-hamming74decoder huggingface.co is an online trial and call api platform, which integrates threshold-hamming74decoder's modeling effects, including api services, and provides a free online trial of threshold-hamming74decoder, you can try threshold-hamming74decoder online for free by clicking the link below.

phanerozoic threshold-hamming74decoder online free url in huggingface.co:

https://huggingface.co/phanerozoic/threshold-hamming74decoder

threshold-hamming74decoder install

threshold-hamming74decoder is an open source model from GitHub that offers a free installation service, and any user can find threshold-hamming74decoder on GitHub to install. At the same time, huggingface.co provides the effect of threshold-hamming74decoder install, users can directly use threshold-hamming74decoder installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

threshold-hamming74decoder install url in huggingface.co:

https://huggingface.co/phanerozoic/threshold-hamming74decoder

Url of threshold-hamming74decoder

threshold-hamming74decoder huggingface.co Url

Provider of threshold-hamming74decoder huggingface.co

phanerozoic
ORGANIZATIONS

Other API from phanerozoic

huggingface.co

Total runs: 92
Run Growth: 39
Growth Rate: 43.82%
Updated:September 26 2026