Binary adder algorithm

  1. Init: Set up Your inputs. Carry is zero.
  2. Start from the rightmost position (represented by thumb).
  3. Apply the transition rule (if necessary, flip the carry to an opposite state).
  4. Set the output bit of the current position.
  5. Proceed to higher position (following finger).
  6. HALT if carry and all inputs are zero, otherwise repeat steps 2-6
click, swipe or press → to begin