Threshold Logic Circuits
Collection
Boolean gates, voting functions, modular arithmetic, and adders as threshold networks.
•
248 items
•
Updated
•
1
Absolute value of 4-bit 2's complement signed integer.
abs4(a) = |a| where a is interpreted as 4-bit 2's complement (-8 to +7)
| Input | Signed | |Abs| | Output | |-------|--------|------|--------| | 0000 | +0 | 0 | 0000 | | 0001 | +1 | 1 | 0001 | | 0010 | +2 | 2 | 0010 | | 0011 | +3 | 3 | 0011 | | 0100 | +4 | 4 | 0100 | | 0101 | +5 | 5 | 0101 | | 0110 | +6 | 6 | 0110 | | 0111 | +7 | 7 | 0111 | | 1000 | -8 | 8 | 1000 | | 1001 | -7 | 7 | 0111 | | 1010 | -6 | 6 | 0110 | | 1011 | -5 | 5 | 0101 | | 1100 | -4 | 4 | 0100 | | 1101 | -3 | 3 | 0011 | | 1110 | -2 | 2 | 0010 | | 1111 | -1 | 1 | 0001 |
5-layer circuit implementing conditional 2's complement negation:
Key formulas for negative path:
| Inputs | 4 |
| Outputs | 4 |
| Neurons | 23 |
| Layers | 5 |
| Parameters | 145 |
| Magnitude | 64 |
MIT