Often, though, they are used for other purposes, such as to route signals in logic circuits. Transistors can be considered the workhorses of modern electronic circuits, and consequently many types of transistors have been developed, among which the most widely used are the bipolar junction transistor (BJT), the junction field-effect transistor (JFET), and the metal oxide silicon field-effect transistor (MOSFET).
One means of doing analog-to-digital conversion is to use a clocked counter that feeds a digital-to-analog converter, whose output is compared with the analog signal to stop the count when the digital-to-analog output exceeds the analog signal. The counter output is then the analog-to-digital output. The comparator for such an analog-to-digital converter is similar to an open-loop operational amplifier (which changes saturation level when one of the differential input levels crosses the other). Other types of analog-to-digital converters, called flash converters, can do the conversion in a shorter time by use of parallel operations, but they are more expensive.
The digital computer is based on digital electronic circuits. Although some of the circuits are quite sophisticated, such as the microprocessors integrated on a single chip, the concepts behind most of the circuits involved in digital computers are quite simple compared to the circuits used for analog signal processing. The most basic circuit is the inverter; a simple realization based upon the MOS transistor is shown in Fig. 3a. The upper (depletion-mode) transistor acts as a load “resistor” for the lower (enhancement-mode) transistor, which acts as a switch, turning on (into its resistive region) when the voltage at point A is above threshold to lower the voltage at point B. Adding the output currents of several of these together into the same load resistor gives a NOR gate, a two-input version of which is shown in Fig. 3b; that is, the output is high, with voltage at VDD, if and only if the two inputs are low. Placing the drains of several of the enhancement-mode switches in series yields the NAND gate, a two-input version of which is shown in Fig. 3c; that is, the output is low if and only if both inputs are high. From the circuits of Fig. 3, the most commonly used digital logic circuits can be constructed. Because these circuits are so simple, digital circuits and digital computers are usually designed on the basis of negation logic, that is, with NOR and NAND rather than OR and AND circuits.
The MOSFET is a versatile device, acting as a voltage-controlled current source in the saturation region and approximately as a voltage-controlled resistor in the resistive region. It can also be electronically controlled between cutoff and the resistive region to make it act as a switch, while for small signals around an operating point in the saturation region it acts as a linear amplifier. Another feature of the MOSFET is that, besides the categories of n-channel and p-channel devices, there are also enhancement- and depletion-mode devices of each category. In practice, for electronic circuit considerations, an n-channel device has Vth > 0 for enhancement-mode devices and Vth < 0 for depletion-mode devices, while the signs are reversed for p-channel devices.