Subtraction


Step by step, subtract 3 from 8.

Step 1: Clear register A.

sub 1

Step 2: Clear register B.

sub 2

Step 3: Flip the 8 switch (8).

sub 3

Step 4: Load into register A.

sub 4

Step 5: Flip the 2 and 1 switches (3).

sub 5

Step 6: Set Route to register B.

sub 6

Step 7: Load into register B.

sub 7

Step 8: Flip the Invert switch (Invert actually inverts register B's output and adds one to the result, utilizing the first bit's carry.)

sub 8

Answer = 5!

sub 9

The "real" way to perform subtraction is to wrap the last bit state around to the first bit, this is called end-round-carry. I didn't care to add the relays required to shift the results so you just ignore the last bit on this adder for the result.

sub 10