2.5 Addition, logically
Using binary arithmetic as we discussed in section 2.2
0 + 0 | = 0 |
1 + 0 | = 1 |
0 + 1 | = 1 |
1 + 1 | = 0 carry 1 |
Focusing on the value after the equal signs and temporarily forgetting the carrying in the last case, this is the same as what xor does with two inputs.
We did lose the carry bit but we limited ourself to having only one output bit. What gate operation would give us that 1 carry bit only if both inputs were also 1, and otherwise return 0? Correct, it’s and! So if we can combine the xor and the and and give ourselves two bits of output, we can do simple addition of two bits.
Question 2.5.1
Try drawing a circuit...