Solution (source code)

= Solution

A <MOSFET> is a voltage-controlled three-terminal switch: the insulated gate controls a conductive channel, giving high input impedance and useful current gain at the circuit level. A <CMOS inverter> actively restores either logic rail, has <voltage> gain near its switching threshold, and ideally draws no static supply current in either settled logic state. Real devices have leakage and consume energy while switching.

A single <p-n junction> is a two-terminal diode; its current is controlled by its own terminal <voltage>, so it does not by itself provide an independently controlled switch, gain and restoring inversion. Cross-coupled <CMOS inverters> form a bistable memory element. \b[A lone inverter is not itself a complete memory cell], and a <p-n junction> can still serve useful rectification or capacitance functions.