Threshold Logic Circuits
Collection
Boolean gates, voting functions, modular arithmetic, and adders as threshold networks.
β’
248 items
β’
Updated
β’
1
3-input XOR gate. Cascade of two standard XOR circuits (OR + NAND + AND).
a b c
β β β
ββββ΄βββ β
βΌ β
βββββββ β
β XOR β β
ββββ¬βββ β
β β
ββββββ¬ββββ
βΌ
βββββββ
β XOR β
ββββ¬βββ
βΌ
XOR3(a,b,c)
Each XOR uses the standard OR + NAND + AND structure:
| Neurons | 6 |
| Layers | 4 |
| Parameters | 18 |
| Magnitude | 20 |
See threshold-xor3-mag14 for a 30% magnitude reduction using optimized XOR blocks.
from safetensors.torch import load_file
w = load_file('model.safetensors')
# See model.py for implementation
MIT