phanerozoic / threshold-hamming74encoder

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

Introduction of threshold-hamming74encoder

Model Details of threshold-hamming74encoder

threshold-hamming74encoder

Hamming(7,4) encoder. Transforms 4 data bits into a 7-bit codeword with single-error correction capability.

Circuit Overview
     d1  d2  d3  d4
      │   │   │   │
      ├───┼───┼───┤
      │   │   │   │
      │   │   │   └────────────────────────────► c7 = d4
      │   │   └───────────────────────► c6 = d3
      │   └──────────────────► c5 = d2
      └─────────────► c3 = d1
      │   │   │   │
      ▼   ▼   │   ▼
    ┌───────────────┐
    │ d1 XOR d2 XOR │──────► c1 = p1
    │      d4       │
    └───────────────┘
      │       │   │
      ▼       ▼   ▼
    ┌───────────────┐
    │ d1 XOR d3 XOR │──────► c2 = p2
    │      d4       │
    └───────────────┘
          │   │   │
          ▼   ▼   ▼
        ┌───────────────┐
        │ d2 XOR d3 XOR │──► c4 = p3
        │      d4       │
        └───────────────┘
The Hamming(7,4) Code

Richard Hamming invented this code in 1950. It encodes 4 data bits into 7 bits such that any single-bit error can be detected and corrected.

Codeword structure:

Position 1 2 3 4 5 6 7
Bit p1 p2 d1 p3 d2 d3 d4
Type parity parity data parity data data data

Parity equations:

  • p1 = d1 ⊕ d2 ⊕ d4 (covers positions 1,3,5,7)
  • p2 = d1 ⊕ d3 ⊕ d4 (covers positions 2,3,6,7)
  • p3 = d2 ⊕ d3 ⊕ d4 (covers positions 4,5,6,7)
3-Way XOR Implementation

Each parity bit requires a 3-input XOR. In threshold logic:

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

      a   b
      │   │
      └─┬─┘
        ▼
    ┌───────┐
    │ XOR   │  (2 layers)
    └───────┘
        │
        │   c
        └─┬─┘
          ▼
      ┌───────┐
      │ XOR   │  (2 more layers)
      └───────┘
          │
          ▼
     XOR(a,b,c)

Total depth: 4 layers per parity. All three parities compute in parallel.

Code Properties
Property Value
Data bits (k) 4
Codeword bits (n) 7
Parity bits (n-k) 3
Minimum distance 3
Error correction 1 bit
Error detection 2 bits
Example Encoding
Data: 1011

p1 = 1 ⊕ 0 ⊕ 1 = 0
p2 = 1 ⊕ 1 ⊕ 1 = 1
p3 = 0 ⊕ 1 ⊕ 1 = 0

Codeword: 0110011
          ↑↑ ↑
          p1p2p3
Architecture
Component Neurons Parameters
p1 (3-way XOR) 6 22
p2 (3-way XOR) 6 22
p3 (3-way XOR) 6 22
d1-d4 pass-through 4 20
Total 22 86

Layers: 4 (two cascaded XOR stages)

All 16 Codewords
Data Codeword HW
0000 0000000 0
1000 1110000 3
0100 1001100 3
1100 0111100 4
0010 0101010 3
1010 1011010 4
0110 1100110 4
1110 0010110 3
0001 1101001 4
1001 0011001 3
0101 0100101 3
1101 1010101 4
0011 1000011 3
1011 0110011 4
0111 0001111 4
1111 1111111 7

Note: Minimum Hamming distance between any two codewords is 3.

Usage
from safetensors.torch import load_file

w = load_file('model.safetensors')

def hamming74_encode(d1, d2, d3, d4):
    """Encode 4 data bits to 7-bit Hamming codeword"""
    # See model.py for full implementation
    pass

# Encode data word 1011
codeword = hamming74_encode(1, 0, 1, 1)
# Returns [0, 1, 1, 0, 0, 1, 1]
Files
threshold-hamming74encoder/
├── model.safetensors
├── model.py
├── config.json
└── README.md
License

MIT

Runs of phanerozoic threshold-hamming74encoder on huggingface.co

13
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
8
30-day runs

More Information About threshold-hamming74encoder huggingface.co Model

More threshold-hamming74encoder license Visit here:

https://choosealicense.com/licenses/mit

threshold-hamming74encoder huggingface.co

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

threshold-hamming74encoder huggingface.co Url

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

phanerozoic threshold-hamming74encoder online free

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

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

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

threshold-hamming74encoder install

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

threshold-hamming74encoder install url in huggingface.co:

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

Url of threshold-hamming74encoder

threshold-hamming74encoder huggingface.co Url

Provider of threshold-hamming74encoder huggingface.co

phanerozoic
ORGANIZATIONS

Other API from phanerozoic

huggingface.co

Total runs: 86
Run Growth: 52
Growth Rate: 63.41%
Updated:September 26 2026