How in the World Does This Work?
The trick is you connect the output of one logic gate to the input of another.
Can You Give an Example?
The simplest gate you can make using the nand gate is the not gate or inverter, this gate takes just one input, and the output is the opposite. You can easily make one of these gates using one nand gate, by sending the single input to both of the nand gate's inputs.
Can You Give Another Example?
Another rather simple gate to make is the and gate, which has the following truth table.
As you can see, it only outputs true if both of its inputs are true. You may also notice that it has the exact opposite outputs as the nand gate. In fact this is why it is called the nand gate, it is short for ‘not and’. So, in order to make one you just invert the output of a nand gate using a not gate.
Are There Other Logic Gates?
Yes, there are some other ones to explore, and with them you can start making simple computers.