MOS Transistor as a Switches and CMOS Logic