Here are the possible answers obtained from adding two bits:
A | B | Carry | Sum | |
---|---|---|---|---|
0 | 0 | 0 | 0 | |
0 | 1 | 0 | 1 | |
1 | 0 | 0 | 1 | |
1 | 1 | 1 | 0 |
We'll just design the "Carry" output of the adder here (the Sum is a bit harder, but also can be done using only transistor switches). The Carry is 1 only if both of our inputs are 1. That is, the Carry is 1 when input A AND input B are 1. Thus we can use two switches in a row just as shown above to build the Carry output of our adding machine.
Using combinations of transistor switches, we can build circuits to add, subtract, multiply, and divide. We can also use them to make very simple decisions, by using the logical AND or the logical OR functions.