II am designing a simple circuit where I want to use the output of one NAND as the input to a NOT gate. I have implemented both the gates using CMOS (NOT with 2 MOSFETs and NAND with 4 MOSFETs). Both of my gates are working fine separately. But when I combine them and give a square wave as an input the output is very weird. I am new to this and am just trying to figure out things. Can anyone please tell me what am I doing wrong?