baumhaus.digital/Studium Generale/Short History of the Learning Machine/Logic, Gates, Machine/Algebra, Really
Why is it called algebra? Because the operations behave like arithmetic on 0 and 1:
AND is multiplication: a · b. NOT is 1 − a.
XOR is addition — but one that forgets the carry (addition modulo 2): 1 + 1 = 0.
Add two single bits properly and look at the two digits of the answer:
| a + b | = carry, sum | carry | sum |
|---|---|---|---|
| 0 + 0 | 00 | 0 | 0 |
| 0 + 1 | 01 | 0 | 1 |
| 1 + 0 | 01 | 0 | 1 |
| 1 + 1 | 10 | 1 | 0 |
The sum digit is XOR. The carry digit is AND. Arithmetic is logic.