Hey! Easy question for you guys. Why do we need both nmos and pmos transistor to build a logic gate? Why can't we just use only nmos transistors like bipolar logic gates?
NMOS for pulldown with resistors for pullup is called RTL (Resistor Transistor Logic). It was one of the first commonly available IC logic families. Hogged huge amounts of power.
NMOS pullup requires a Gate voltage higher than VDD, so is not practical.
PMOS pullup means that the transistor is turned-on by pulling the Gate to VSS, so coupled with NMOS for pulldown is the wonderful combination.