//example 3.7// //4 input nand gate using and and not// clc //refreshes all variables// clear //clears the screen// disp('in the figure output of first gate is given to input of second gate with the other input C. output of second gate is input to the third gate and finally a not gate is applied to third output.') //result//