Transistors and CPU Architecture


Transistors and CPU Architecture

Maria
Inside a modern computer are dozens of microchips, and a processor can contain tens of billions of transistors. Those transistors are only a few nanometers across, but the key to understanding a processor is not just what one transistor does. It’s how billions of them are organized and connected—something we can picture a little like building a huge Lego set.

Corey
So what’s the Lego comparison? Is one transistor like one tiny brick?

Maria
Close: think of one transistor as a single Lego stud. By itself, a stud—or a transistor—doesn’t accomplish much. Connect several transistors and you get a standard cell, the fundamental building block used in CPUs and GPUs. That’s like combining studs into a Lego piece that can be used in a larger creation.

Corey
And different combinations create different standard cells. An inverter uses two transistors, a NAND gate uses four, and an OR gate uses six in the examples we’re looking at. There are many other combinations too, just as Lego pieces come in different shapes and sizes.

Maria
Let’s start with the inverter, because its job is simple: it reverses its input. A logic 1 becomes a 0, and a 0 becomes a 1. The logic symbol is a compact way to describe that behavior, while the standard cell is the actual physical arrangement of transistors, contacts, and wires that performs it.

Corey
What’s inside one of those transistors? The simplified FinFET has a gate, a channel, and a dielectric between them. The dielectric is an insulating barrier, so electricity doesn’t pass straight from the gate into the channel. Metal contacts and vertical connections, called vias, carry electricity to and from the transistor’s other parts.

Maria
An N-type transistor acts a bit like a faucet: apply 1 volt to its gate and it turns on, allowing electricity to flow through the channel. Apply 0 volts and it turns off, blocking that flow. The name FinFET refers to its fin-like shape.

Corey
A P-type transistor responds in the opposite way. It turns on when its gate is at 0 volts and turns off when the gate is at 1 volt. If the N-type is a faucet that opens when you turn its handle on, the P-type is like a backwards faucet: it opens when the control is low.

Maria
An inverter pairs one N-type and one P-type transistor and connects their gates to the same input. Because they respond oppositely, when the input is 1, the N-type is on and the P-type is off. When the input is 0, the P-type is on and the N-type is off.

Corey
The cell also has a power rail held at 1 volt and a ground rail held at 0 volts. Conductive wires—made from metals such as copper, tungsten, or aluminum—connect the rails and transistor contacts. Vias link the different parts, and local interconnects carry signals within the standard cell. The spaces around those wires are filled with insulating dielectric, not empty air.

Maria
Now follow the inverter’s output. If the input is 1, the N-type transistor turns on, connecting the output to ground, so the output is 0. The P-type is off, so it doesn’t connect the output to the power rail. If the input is 0, the P-type turns on and connects the output to the 1-volt power rail, while the N-type is off. The output is 1.

Corey
That’s the whole inverter truth table: input 0 gives output 1, and input 1 gives output 0. In a schematic, we usually draw the two transistors as symbols, with the P-type connected to power, the N-type connected to ground, and their shared output between them. That’s a much simpler view than the physical layout, but it represents the same circuit.

Maria
The inverter is an example of a CMOS circuit: complementary metal-oxide-semiconductor technology, which uses N-type and P-type transistors with opposite behavior. A well-designed CMOS circuit has high noise tolerance and low power consumption. In the inverter, one transistor is off at a time, and the design avoids a direct conducting path from the power rail to ground.

Corey
Once you understand the inverter, it’s easier to make sense of more complicated standard cells. A NAND gate performs AND followed by NOT: its output is 0 only when both inputs are 1. For inputs 00, 01, or 10, the output is 1; for 11, it’s 0.

Maria
Its four transistors are arranged in two groups. Two P-type transistors sit in parallel above, and two N-type transistors sit in series below. The P-types provide a path from power to the output if either input is 0. The N-types connect the output to ground only when both inputs are 1, because both series transistors must be on.

Corey
That parallel-versus-series distinction is useful. With parallel paths, either transistor can provide the connection; with series transistors, every transistor in the chain must be on. In the NAND gate, the P-type parallel arrangement makes the output high for any input containing a 0, while the N-type series arrangement pulls it low only for 11.

Maria
An AND gate is a NAND gate followed by an inverter. That extra inversion changes the NAND result: the AND output is 1 only when both inputs are 1, and it’s 0 if either input is 0. The corresponding standard cell connects a NAND’s output to an inverter’s input.

Corey
NOR and OR gates follow a similar pattern. A NOR gate has its P-type transistors in series and its N-types in parallel, so its output is 1 only when both inputs are 0. Put an inverter after a NOR gate and you get an OR gate, whose output is 1 when either or both inputs are 1.

Maria
Exclusive OR, or XOR, has a more specific rule: the output is 1 when exactly one input is 1. So 01 and 10 produce 1, while 00 and 11 produce 0. Exclusive NOR, or XNOR, does the opposite: it produces 1 when the inputs match. The examples use ten transistors for each of these more complicated standard cells.

Corey
So the logic behavior can be summarized in words: AND requires both inputs to be 1; OR requires at least one; NAND and NOR invert those results; XOR asks whether exactly one input is 1; and XNOR asks whether the inputs are equal. The physical transistor arrangements are what make each of those truth tables happen.

Maria
There’s a second level in our Lego picture. Many standard cells connected together form a macrocell, also called a module, functional block, functional unit, block, or unit. One example is an adder built from about 160 standard cells. A higher wiring layer, called Metal 1 or M1, connects those cells together.

Corey
In that example, the input numbers arrive as binary 1s and 0s on two groups of 32 wires, and the result leaves on 33 wires. Those wires carry the bits between the standard cells. The cells fit into rows alongside power and ground rails, much like Lego pieces arranged into a larger set.

Maria
More complicated functions need larger macrocells. A 32-bit multiplication macrocell in the example contains about 6,100 standard cells. That’s comparable in complexity to a Lego set made from roughly 7,500 pieces. It takes many different gates and connections to combine two numbers and produce their product.

Corey
And the hierarchy continues. Multiple macrocells can make up an IP core; multiple IP cores can be combined into a processor core or a hardware accelerator; and those elements can be assembled into a complete chip. The chip is then part of a processor package, which can be mounted on a motherboard.

Maria
The wires also form a hierarchy. Local interconnects handle connections within standard cells, and M1 can connect cells in a small macrocell. A CPU uses around 17 metal wiring layers to connect larger structures, including macrocells, IP cores, and cores. So when we say a processor is made from billions of transistors, we also mean an enormous web of connected logic and kilometers of wire.

Corey
That’s why the Lego analogy works: a single piece isn’t impressive on its own, but carefully connecting thousands or millions of pieces creates something useful. A transistor or simple logic gate may seem limited by itself. Put billions of them together and the resulting integrated circuit can run applications, show videos, or render complex games.

Maria
The explanation may take several minutes, but a transistor’s response is incredibly fast. The source gives a scale of a few picoseconds for a standard cell to respond to a change in input and produce its logic result. A multiplication macrocell with more than 6,000 standard cells is described as taking roughly 150 to 200 picoseconds for its inputs to propagate through and yield the correct output.

Corey
One important caveat is that the transistor drawings are simplified. Real FinFETs are complicated, and many use multiple fins to improve their electrical characteristics. The details of transistor physics, manufacturing, and why CMOS arranges P-types and N-types as it does are deeper topics than these simple circuit pictures can show.

Maria
But the big picture is clear: transistors switch electrical paths on and off; combinations of transistors form standard cells that implement logic; standard cells combine into macrocells; and higher-level structures combine into processor chips. Understanding that ladder—from a tiny switch to a complex circuit—is the key to seeing how billions of transistors can work together.

Corey
And once you can read the basic inverter, NAND, AND, NOR, OR, XOR, and XNOR behaviors, you have a foundation for understanding the logic inside larger circuits. The small building blocks matter because the processor’s power comes from connecting them in the right patterns, at enormous scale.

Ask anything
We've read this whole study set, so questions about it get the best answers.