See also:

Nice intro to transistors : cs.bu.edu/courses/modules/Transistors2Gates/