From a NAND Gate To Tetris
mikejuk writes "Long before the current crop of MOOCs (Massive Online Open Course) there was a course that taught you all you needed to know about computers by starting from the NAND gate and working its way up through the logic circuits needed for a computer, on to an assembler, a compiler, an operating system, and finally Tetris. Recently one of the creators of the course, Shimon Schocken, gave a TED talk explaining how it all happened and why it is still relevant today. Once you have seen what is on offer at http://www.nand2tetris.org/ you will probably decide that it is not only still relevant but the only way to really understand what computers are all about."
No, but it sums up all the useful/practical ones.
If you only have two inputs, there are only 4 rows in the table,:
| A | B |
| 0 | 0 |
| 0 | 1 |
| 1 | 0 |
| 1 | 1 |
This yields only 16 possible output columns:
0000 - does not vary with input
0001 - AND
0010 - not commutative
0011 - reacts only to A
0100 - not commutative
0101 - reacts only to B
0110 - XOR
0111 - OR
1000 - NOR
1001 - XNOR
1010 - reacts only to B
1011 - not commutative
1100 - reacts only to A
1101 - not commutative
1110 - NAND
1111 - does not react to input
That makes 6 potentialy desirable operations. The seventh is NOT, which takes only one input.
The not commutative ones could conceivably be put to useful work, but in physical designs the asymmetry is impractical, and you can trivially construct them from other gates if need be. In fact some of the useful ones ar also usually constructed from combinations of the others, and all of them *can* be constructed from combinations of NAND gates.
sudo ergo sum