Implement NAND gate. Closes #25.