Add nand-gate tutorial code