realization of basic gates using nand gate