You can make every logic gate by using only NAND gates:
You can make every logic gate by using just NOR gates: