Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 0. put 1 atom on the bonder. This is the +1 needed for 2's complement
- 1. (Triplex conditional) take least significant digit from A and B, convert (Fire, Salt) into (Atom, No Atom) (reverse for B) using triplex
- 2. bond all resulting atoms in a line. There can be 0, 1, 2, 3 atoms
- 3a. (Grab conditional) if Length >=2, grab with arm 8, discard 1 atom, leave 1 on bonder, if L = 3, there will be an atom on the debonder
- 3b. (Grab conditional) if Length <=1, grab with arm 10, move the atom to the debonder
- 3c. the atom on the bonder is the Carry bit, the atom on the debonder is the Sum bit
- 4. (Input suppression conditional) grab Sum (which might be Fire/Salt or No Atom), convert it into Fire, place it on the Salt position of Stabilized Fire
- 5. (Input suppression conditional) grab whatever is on the Salt position of Stabilized Fire, remove extra Fire if it exists, push into output bonder
- 6. repeat 1-5 7 more times
- 7. cleanup
Advertisement
Add Comment
Please, Sign In to add comment