Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add swap r!=0 && 15 15-r result
- 0 0 0 0 a-b
- 0 0 0 1 15-(a-b), 15+b-a
- 0 0 1 0 (a>b) && 15
- 0 0 1 1 (a<=b) && 15
- 0 1 0 0 b-a
- 0 1 0 1 15-(b-a), 15+a-b
- 0 1 1 0 (a>b) && 15
- 0 1 1 1 (a>=b) && 15
- short
- 1 0 0 0 a+b
- 1 0 0 1 15-(a+b), 15-a-b
- 1 0 1 0 (a||b) && 15
- 1 0 1 1 (!a && !b) && 15
- 1 1 0 0 max(a,b)
- 1 1 0 1 15-max(a,b), min(15-a,15-b)
- 1 1 1 0 (b||a) && 15
- 1 1 1 1 (!b && !a) && 15
- The first bit of the instruction controls whether to add or subtract. The
- second bit controls whether to short/swap the two inputs. The third bit, if
- active, takes the sum/difference produced by the adder/subtractor and sets
- output to full power if it isn't zero. The fourth bit activates the analog
- inverter.
- When in subtract mode, the "swap" bit will swap inputs A and B. When in add
- mode, the "swap" bit will actually short inputs A and B together, meaning that
- both A and B will be equal to max(A,B).
Advertisement
Add Comment
Please, Sign In to add comment