How computers work

Transistor: a switch controlled by voltage

Everything a computer does comes down, at the very bottom, to tens of billions of tiny switches. A MOSFET field-effect transistor lets current flow between the source and the drain only when the right voltage is applied to its third terminal, the gate. There are no moving parts: the “switching” is done by an electric field, and it happens in picoseconds. This article covers what a transistor is made of, why it turns on and off, and how it shrank from tens of micrometers to a few nanometers.

Open in 3D →

The idea: a switch controlled by another wire

An ordinary wall switch opens and closes a circuit by hand. Computing needs a switch that is controlled not by a hand but by another electrical signal: then the output of one switch can control the next ones, and they can be chained into circuits of any complexity. The first computers did this with electromagnetic relays, then with vacuum tubes; since the late 1950s, with transistors.

A MOSFET has three main terminals. The source and the drain are the ends of a “pipe” through which current can flow. The gate is a control electrode above this pipe. The gate is separated from the silicon by an insulator, so in the steady state no current flows through it: it only creates an electric field. This is the key property: keeping a transistor on costs no energy, you only have to hold the voltage.

A handy analogy is a water faucet whose handle is turned by the pressure in another pipe. The analogy is incomplete: nothing moves inside a transistor except electrons, and the “faucet” appears and disappears in the silicon itself under the action of the field.

The transistor itself knows nothing about zeros and ones. It is an analog device: the current through it depends smoothly on the gate voltage. It becomes digital by convention: in logic circuits it is always driven between two extreme states, “almost fully on” and “almost fully off,” and the intermediate states are not used.

Silicon and the substrate

A transistor is made of monocrystalline silicon: a single continuous crystal grown from a melt and sliced into wafers 300 mm in diameter and about 0.8 mm thick. The silicon is purified to 99.9999999% and higher: a single foreign atom per billion already noticeably changes its properties.

A silicon atom has four outer electrons, and in the crystal each of them takes part in a bond with a neighbor. There are almost no free charge carriers: at room temperature there are about 10¹⁰ per cubic centimeter, against 5·10²² atoms. That is why pure silicon is a poor conductor, a semiconductor.

Conductivity is controlled by adding impurities; this is called doping. An atom of phosphorus or arsenic brings a fifth electron that has no place in the bonds: it becomes free, and the result is n-type silicon (n for negative). An atom of boron brings only three electrons, and an unfilled bond, a “hole,” remains in the lattice. A neighboring electron can jump into it, leaving a hole in its own place, so the hole moves like a positive charge: the result is p-type silicon (p for positive).

The basis of an nMOS transistor is a lightly doped p-substrate, about 10¹⁵–10¹⁸ boron atoms per cubic centimeter. Its carriers are holes, and there are almost no free electrons. That is exactly why no current flows between the source and the drain until the gate “allows” it. A pMOS is the mirror image: it sits in an n-well, an island of n-type silicon inside the p-substrate, and holes carry the current in it.

The model shows an nMOS in cross-section: the p-substrate is the bottom block on which all the other parts rest. In a real chip there are hundreds of millions of such transistors under one square millimeter, and they all sit in the top layer of silicon, a fraction of a micrometer thick; the rest of the wafer’s thickness is just mechanical support.

Source and drain

At the edges of the transistor are two heavily doped regions: n+ in an nMOS (about 10²⁰ atoms of phosphorus or arsenic per cubic centimeter, hundreds of thousands of times more than in the substrate) and p+ in a pMOS. These are the source and the drain: current enters and leaves the transistor through them. They contain so many free electrons that they behave almost like metal.

The source and the drain are built the same way; the transistor is symmetric. The source is the side the charge carriers come from: in an nMOS it is the terminal at the lower potential (in logic, the one connected to ground), in a pMOS the one at the higher potential (connected to the supply). In circuits where current can flow both ways, the source and the drain swap roles on the fly.

Between the source and the drain lies a stretch of p-substrate. At each boundary between n+ and p a p-n junction forms: electrons from the n-region move into the p-region and meet holes there, and near the boundary a depletion layer with no free charges remains, with a built-in voltage of about 0.7 V. For electrons coming from the source this is a barrier. The result is an n+ – p – n+ chain, that is, two p-n junctions facing each other: whatever the polarity, one of them is blocking.

While the barrier stands, the transistor is off and the current through it is practically zero, only a leakage of the order of nanoamperes. The leakage is small for one transistor, but across tens of billions it adds up to watts: this is one of the reasons why idle blocks of a chip are completely cut off from power.

The gate and the gate dielectric

Above the region between the source and the drain lies the gate, a conducting electrode. It is separated from the silicon by a gate dielectric about a nanometer thick, just a few layers of atoms. No current flows through the dielectric: the gate acts as one plate of a capacitor, and the silicon beneath it as the other. Applying a voltage to the gate means charging this capacitor.

The gate capacitance of a modern transistor is a fraction of a femtofarad. At a voltage of 0.8 V and a capacitance of 0.1 fF, the charge arriving at the gate is about 8·10⁻¹⁷ C, only about five hundred electrons. Such tiny charges are what make it possible to switch in picoseconds and spend negligible energy on each switch.

The thinner the dielectric, the stronger the field at the same voltage and the better the gate controls the channel. The dielectric used to be silicon oxide, SiO₂, hence the “oxide” in the name MOSFET (metal–oxide–semiconductor). By the 90–65 nm processes its thickness had reached about 1.2 nm, around five atomic layers, and electrons began passing through it by quantum tunneling: leakage through the gate grows exponentially as the layer gets thinner.

The way out was materials with a high dielectric constant, high-k, based on hafnium oxide, HfO₂. Its permittivity is about 20–25 versus 3.9 for SiO₂, so a layer a few nanometers thick acts like 1 nm of silicon oxide, while the tunneling leakage is much lower. At the same time the polysilicon gate was replaced with a metal one. This combination, HKMG (high-k / metal gate), entered mass production in 2007 at the 45 nm process and is still used today.

The name “metal–oxide–semiconductor” survives by tradition, even though from the 1970s to the 2000s the gate was made of polysilicon, and today the “oxide” is a stack of thin SiO₂ and a layer of HfO₂.

The channel: how current appears

Let’s apply a positive voltage to the gate of an nMOS. The gate’s field pushes holes away from the surface deeper into the substrate and attracts electrons to it, from the source and drain, where there are plenty of them. When the voltage exceeds the threshold Vth (about 0.2–0.4 V in modern chips), right at the surface under the dielectric there are more electrons than holes: a thin layer of p-type silicon is “inverted” into n-type. This inversion layer, a nanometer or two thick, is the channel.

The channel connects the n+ source to the n+ drain with a continuous strip of n-type silicon, the barrier disappears, and if there is a voltage between the source and the drain, current flows. The higher the gate voltage above the threshold, the more electrons there are in the channel and the stronger the current. At a small drain–source voltage the transistor behaves like a resistor whose resistance is set by the gate; at a large one the current stops growing, and saturation sets in.

Remove the voltage from the gate and the field disappears, the channel electrons go back into the source and drain, the barrier is restored, and the transistor turns off. All this takes picoseconds: the channel is about ten nanometers long, and electrons cross it in roughly a tenth of a picosecond. Most of the time is spent not on the transistor itself but on recharging the wires and the gates of the next transistors that it has to “drive.”

Below the threshold the current does not drop to zero abruptly but falls exponentially, roughly tenfold for every 60–70 mV at room temperature. This is a physical limit tied to the thermal energy of electrons. It leads to an important constraint: for an off transistor to really be off (with a current tens of thousands of times lower than when on), the threshold cannot be lowered too far, and therefore neither can the supply voltage. That is why core supply voltages have long been stuck at around 0.7–1.3 V and barely go down.

In the model’s demo step, the gate charges first, then the channel appears, and only then do electrons flow from the source to the drain, which is exactly the order in which it happens. The carrier animation is illustrative: currents are not computed.

Contacts and wires

Metal contacts come down from above to the source, drain, and gate: vertical pillars of tungsten or cobalt tens of nanometers wide. So that the contact to the silicon is not a barrier, the surface under it is turned into a silicide, a compound of metal and silicon that conducts current well.

Above the contacts are 10–20 layers of metal wires, separated by an insulator and connected by vertical vias. The lower layers are the thinnest and densest: the wire pitch is about 20–30 nm, and these are local connections inside cells. The higher the layer, the thicker and sparser the wires: the top ones, micrometers thick, distribute power and the clock signal across the chip. The wires are copper, with thin barrier layers so that the copper does not migrate into the silicon.

Thin wires are a serious problem in modern chips. Resistance grows in inverse proportion to the cross-sectional area, and on the lower layers the delay in the wires is comparable to or greater than the delay of the transistors themselves. That is why manufacturers are moving to backside power delivery (Intel PowerVia in the 18A process, TSMC A16): power comes from below, through thinned silicon, and all the upper layers remain for signals.

The model labels where each contact leads: for a transistor inside a gate, the source goes to ground or to the supply, and the drain goes to the gate’s output. Logic appears right here, in the wires: when transistors are connected into gates, high voltage is agreed to mean one and low voltage zero.

nMOS and pMOS: the CMOS pair

An nMOS turns on with a high voltage on its gate and is good at pulling the output down to ground, to zero. A pMOS turns on with a low voltage on its gate (relative to the supply) and is good at pulling the output up to the supply, to one. In CMOS technology (complementary MOS) they are always placed in pairs with a common input: while one is on, the other is off.

Hence the main advantage of CMOS: in the steady state there is no direct path from the supply to ground, and a gate draws almost no current. Energy is spent mostly when switching, on recharging the output capacitance. Switching power is computed with the formula P ≈ α·C·V²·f: α is the fraction of gates that switch per clock cycle, C is the capacitance, V is the voltage, and f is the frequency. The square of the voltage explains why lowering the supply from 1.2 to 0.8 V cuts power by more than half.

The second component is static leakage: off transistors still let a little current through. In a hot chip on a fine process, leakage can be a noticeable share of total power. It is fought by choosing transistors with different thresholds (fast ones with low Vth on critical paths, economical ones with high Vth everywhere else) and by cutting power to idle blocks.

Electrons in silicon are about twice as mobile as holes, so a pMOS of the same size conducts worse. pMOS transistors used to be made wider; in modern chips hole mobility is raised by mechanical strain: germanium is added to the pMOS channels (SiGe), which compresses the lattice.

Switch the transistor type and the gate level in the lab: you can see that at the same voltage the nMOS and pMOS behave in opposite ways. On the Gate level you can see how this pair combines into an inverter.

Scale: sizes and numbers

A modern processor from 2024–2025 is made on “3–5 nm” processes. The real dimensions are different: the distance between neighboring gates (contacted poly pitch) is about 45–50 nm, the pitch of the densest wires is about 20–25 nm, and the thickness of a silicon fin or channel ribbon is 5–7 nm, only 10–15 interatomic distances (the lattice constant of silicon is 0.543 nm).

Transistor counts: the eight-core AMD Zen 5 compute die, about 71 mm² in area, contains roughly 8 billion transistors; large systems-on-chip such as the Apple M3 Max contain 92 billion. Logic density is hundreds of millions of transistors per square millimeter; a six-transistor SRAM memory cell takes up about 0.02 µm².

Core supply voltage is 0.7–1.3 V, and the turn-on threshold is 0.2–0.4 V. An on transistor passes on the order of tens of microamperes, an off one nanoamperes or less. One switch of a logic gate takes from one to tens of picoseconds and costs on the order of a femtojoule of energy.

For comparison: the first microprocessor, the Intel 4004 (1971), contained 2,300 transistors made with 10 µm technology and ran at 740 kHz. Over half a century, the number of transistors on a chip has grown roughly ten-million-fold.

From the planar transistor to FinFET and GAA

The model shows a flat (planar) MOSFET in cross-section, which makes the channel easier to see. Transistors were like this up to the 22 nm process. When the channel became shorter than about 25 nm, the gate on top could no longer reliably shut it off: the drain’s field “reached” the source, and an off transistor leaked.

The solution was to wrap the gate around the channel from several sides. In the FinFET (in mass production since 2011–2012, Intel 22 nm), the channel was raised into a vertical “fin” a few tens of nanometers tall, and the gate wraps it on three sides. The width of a transistor is now set by the number of fins, 1, 2, 3, so the current can only be increased in steps.

At 2–3 nm the industry moved to GAA (gate-all-around, nanosheet; at Intel, RibbonFET): the channel is a stack of 3–4 thin horizontal ribbons, and the gate surrounds each of them on all sides. Samsung started GAA production in 2022, TSMC (N2) and Intel (18A) in 2025. The next step is CFET, where the nMOS and pMOS are stacked on top of each other rather than side by side.

Process names such as “7 nm,” “3 nm,” and “2 nm” long ago became marketing labels and do not equal any real dimension; they merely denote a technology generation with roughly twice the density of the previous “full” generation. But the principle has not changed since the 1960s: the gate voltage creates or removes a channel between the source and the drain.

Common misconceptions

“A transistor stores a bit.” No: a transistor is a switch, and it does not remember its state once the gate voltage is removed. Memory is built from several transistors connected in a loop (an SRAM cell has six transistors) or from a transistor and a capacitor (a DRAM cell). The exception is flash memory, where the transistor has an insulated “floating” gate that holds a charge for years.

“Electrons in a processor run at the speed of light.” The electrons themselves move slowly: even in a short channel under a strong field their speed is on the order of 10⁵ m/s, and in ordinary wires the drift is a fraction of a millimeter per second. What propagates quickly is the electromagnetic field, at roughly half the speed of light in circuit-board conductors. On the chip, the signal is limited not by the speed of light but by the time it takes to recharge the RC chains of the wires.

“The gate draws current while the transistor is on.” Not in the steady state: only a negligible tunneling leakage flows through the insulator. Current flows only at the moment the gate is being recharged.

“3 nm is the length of the transistor.” No, see above: real gate pitches are about 45–50 nm, and the “nanometers” in the name are the name of a generation.

“More transistors mean a higher clock frequency.” Frequency is limited by wire delays, the depth of logic per clock cycle, and heat. Since the mid-2000s frequencies have barely grown (3–6 GHz), and the extra transistors go into more cores, caches, and wider cores.

A bit of history

The first transistor, a point-contact germanium device, was made by Bardeen and Brattain in Shockley’s group at Bell Labs in 1947; it was not a field-effect device. In 1948 Shockley proposed the junction (bipolar) transistor. The idea of the field-effect transistor had been patented back in the 1920s, but nobody knew how to make one: the semiconductor surface was too “dirty.” A working MOSFET on oxidized silicon was demonstrated by Atalla and Kahng in 1959–1960.

In 1963 Frank Wanlass of Fairchild proposed CMOS, pairs of nMOS and pMOS with almost zero power draw at rest. CMOS was first used in watches and calculators, and since the 1980s it has been the main technology for all processors.

In 1965 Gordon Moore noticed that the number of transistors on a chip doubled every year (later, every two years). Until the mid-2000s Dennard scaling also held: by shrinking the transistor, you could lower the voltage and raise the frequency at the same power density. Around 2005 the voltage hit the physical limit of subthreshold current, frequency growth stopped, and the industry moved to multi-core processors. Transistor density is still growing, though more slowly and at greater cost.

Open in 3D →

All articles

Overviews

Logic: from transistor to arithmetic

Processor

Computer

Servers and data centers

Networks and the internet

Software