Function of and, or, nand, nor or not