phanerozoic / threshold-alu4bit

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

Introduction of threshold-alu4bit

Model Details of threshold-alu4bit

threshold-alu4bit

4-bit Arithmetic Logic Unit as threshold circuit. Performs arithmetic and bitwise operations on two 4-bit operands.

Circuit
A[3:0]  ──┐
B[3:0]  ──┼──► ALU ──┬──► R[3:0]  (result)
op[1:0] ──┘         ├──► Cout    (carry out)
                    └──► Zero    (zero flag)
Operations
op Operation Description
00 ADD R = A + B
01 SUB R = A - B (2's complement)
10 AND R = A & B
11 XOR R = A ^ B
Flags
  • Cout : Carry out from addition, borrow (inverted) from subtraction
  • Zero : Set when result is 0
Architecture
Component Count Neurons
Full Adders 4 28
B XOR (for SUB) 4 12
Bitwise AND 4 4
Bitwise XOR 4 12
Output MUX4 4 20
Zero detect 1 1
Cout MUX 1 5

Total: 82 neurons, 282 parameters, 5 layers

How Subtraction Works
A - B = A + (~B) + 1  (2's complement)

When op=01:
- B bits are XORed with 1 (inverted)
- Carry-in is set to 1
- Result is A - B
Usage
from safetensors.torch import load_file

w = load_file('model.safetensors')

# Examples:
# op=0: 5 + 3 = 8, cout=0, zero=0
# op=1: 5 - 3 = 2, cout=1, zero=0
# op=2: 5 & 3 = 1, cout=0, zero=0
# op=3: 5 ^ 3 = 6, cout=0, zero=0
Files
threshold-alu4bit/
├── model.safetensors
├── create_safetensors.py
├── config.json
└── README.md
License

MIT

Runs of phanerozoic threshold-alu4bit on huggingface.co

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

More Information About threshold-alu4bit huggingface.co Model

More threshold-alu4bit license Visit here:

https://choosealicense.com/licenses/mit

threshold-alu4bit huggingface.co

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

threshold-alu4bit huggingface.co Url

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

phanerozoic threshold-alu4bit online free

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

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

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

threshold-alu4bit install

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

threshold-alu4bit install url in huggingface.co:

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

Url of threshold-alu4bit

threshold-alu4bit huggingface.co Url

Provider of threshold-alu4bit huggingface.co

phanerozoic
ORGANIZATIONS

Other API from phanerozoic

huggingface.co

Total runs: 1.3K
Run Growth: 1.3K
Growth Rate: 100.00%
Updated:April 28 2026