NAND and NOT gates