phanerozoic / threshold-ctz4

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

Introduction of threshold-ctz4

Model Details of threshold-ctz4

threshold-ctz4

4-bit count trailing zeros. Returns the number of consecutive zero bits starting from the LSB.

Function

ctz4(x3, x2, x1, x0) -> count (0-4)

  • CTZ = 0 if x0 = 1 (no trailing zeros)
  • CTZ = 1 if x0 = 0, x1 = 1
  • CTZ = 2 if x0 = x1 = 0, x2 = 1
  • CTZ = 3 if x0 = x1 = x2 = 0, x3 = 1
  • CTZ = 4 if all bits are zero
Truth Table (selected rows)
Input CTZ Output
0001 0 000
0010 1 001
0100 2 010
1000 3 011
0000 4 100
0110 1 001
1100 2 010
Architecture
x3 x2 x1 x0
    │
    ▼
┌─────────────────────────────────┐
│ Layer 1: Prefix conditions      │
│ p0 = (x0=0)                     │
│ p01 = (x0=x1=0)                 │
│ p012 = (x0=x1=x2=0)             │
│ all_zero = (all=0)              │
└─────────────────────────────────┘
    │
    ▼
┌─────────────────────────────────┐
│ Layer 2: One-hot position       │
│ z1 = p0 AND x1                  │
│ z2 = p01 AND x2                 │
│ z3 = p012 AND x3                │
└─────────────────────────────────┘
    │
    ▼
┌─────────────────────────────────┐
│ Layer 3: Binary encoding        │
│ y2 = all_zero                   │
│ y1 = z2 OR z3                   │
│ y0 = z1 OR z3                   │
└─────────────────────────────────┘
    │
    ▼
  y2 y1 y0
Parameters
Inputs 4
Outputs 3
Neurons 10
Layers 3
Parameters 37
Magnitude 30
Usage
from safetensors.torch import load_file
import torch

w = load_file('model.safetensors')

# ctz4(0,1,0,0) = 2 (binary 0100 has 2 trailing zeros)
# See model.py for full implementation
Applications
  • Finding the lowest set bit position
  • Efficient division by powers of 2
  • Bit manipulation in cryptography
  • Hardware priority encoders
License

MIT

Runs of phanerozoic threshold-ctz4 on huggingface.co

2
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
2
30-day runs

More Information About threshold-ctz4 huggingface.co Model

More threshold-ctz4 license Visit here:

https://choosealicense.com/licenses/mit

threshold-ctz4 huggingface.co

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

phanerozoic threshold-ctz4 online free

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

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

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

threshold-ctz4 install

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

threshold-ctz4 install url in huggingface.co:

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

Url of threshold-ctz4

threshold-ctz4 huggingface.co Url

Provider of threshold-ctz4 huggingface.co

phanerozoic
ORGANIZATIONS

Other API from phanerozoic

huggingface.co

Total runs: 1.2K
Run Growth: 1.2K
Growth Rate: 100.00%
Updated:April 25 2026