| license: mit | |
| tags: | |
| - pytorch | |
| - safetensors | |
| - threshold-logic | |
| - neuromorphic | |
| # threshold-shiftright4 | |
| 4-bit logical right shift by 1 bit. | |
| ## Function | |
| shiftright4(a3, a2, a1, a0) = [0, a3, a2, a1] | |
| LSB (a0) is discarded, 0 shifts in at MSB. | |
| ## Examples | |
| | Input | Output | | |
| |-------|--------| | |
| | 0001 | 0000 | | |
| | 0101 | 0010 | | |
| | 1000 | 0100 | | |
| | 1111 | 0111 | | |
| ## Architecture | |
| Single layer with 4 neurons. | |
| | Output | Source | Weights | Bias | | |
| |--------|--------|---------|------| | |
| | y3 | 0 | [0,0,0,0] | -1 | | |
| | y2 | a3 | [1,0,0,0] | -1 | | |
| | y1 | a2 | [0,1,0,0] | -1 | | |
| | y0 | a1 | [0,0,1,0] | -1 | | |
| ## Parameters | |
| | | | | |
| |---|---| | |
| | Inputs | 4 | | |
| | Outputs | 4 | | |
| | Neurons | 4 | | |
| | Layers | 1 | | |
| | Parameters | 8 | | |
| | Magnitude | 7 | | |
| ## License | |
| MIT | |