phanerozoic / threshold-popcount4

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

Introduction of threshold-popcount4

Model Details of threshold-popcount4

threshold-popcount4

4-bit population count. Counts the number of 1 bits in a 4-bit input.

Function

popcount4(a, b, c, d) = binary count of 1 bits

Output [y2, y1, y0] is the 3-bit binary representation of the count (0-4).

Truth Table
a b c d count y2 y1 y0
0 0 0 0 0 0 0 0
0 0 0 1 1 0 0 1
0 0 1 1 2 0 1 0
0 1 1 1 3 0 1 1
1 1 1 1 4 1 0 0
Architecture
         a   b   c   d
         |   |   |   |
    +----+---+---+---+----+
    |                     |
Layer 1:                  |
    y2 = (sum >= 4)       |
    ge2 = (sum >= 2)      |
    le3 = (sum <= 3)      |
    XOR(a,b) components   |
    XOR(c,d) components   |
    |                     |
Layer 2:                  |
    y1 = AND(ge2, le3)    |
    xor_ab = XOR(a,b)     |
    xor_cd = XOR(c,d)     |
    |                     |
Layer 3:                  |
    XOR(xor_ab, xor_cd)   |
    components            |
    |                     |
Layer 4:                  |
    y0 = XOR(xor_ab, xor_cd)
  • y2 (MSB): 1 when count = 4
  • y1 : 1 when count is 2 or 3
  • y0 (LSB): 1 when count is odd (parity = XOR4)
Parameters
Inputs 4
Outputs 3
Neurons 13
Layers 4
Parameters 53
Magnitude 55
Usage
from safetensors.torch import load_file
import torch

w = load_file('model.safetensors')

# See model.py for full implementation
# popcount4(1, 0, 1, 1) returns [0, 1, 1] (count=3 = binary 011)
License

MIT

Runs of phanerozoic threshold-popcount4 on huggingface.co

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

More Information About threshold-popcount4 huggingface.co Model

More threshold-popcount4 license Visit here:

https://choosealicense.com/licenses/mit

threshold-popcount4 huggingface.co

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

threshold-popcount4 huggingface.co Url

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

phanerozoic threshold-popcount4 online free

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

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

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

threshold-popcount4 install

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

threshold-popcount4 install url in huggingface.co:

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

Url of threshold-popcount4

threshold-popcount4 huggingface.co Url

Provider of threshold-popcount4 huggingface.co

phanerozoic
ORGANIZATIONS

Other API from phanerozoic

huggingface.co

Total runs: 38
Run Growth: -7
Growth Rate: -18.42%
Updated:April 28 2026