Transistors and CPU Architecture
How Transistors Build Computer Circuits
1. From transistors to complete chips
A processor contains billions of transistors arranged in carefully designed circuits. A useful way to understand this organization is to compare it to building with Lego:
An individual transistor is like a Lego stud: it is a basic element that becomes useful when connected to other elements.
A group of connected transistors forms a standard cell, such as an inverter or NAND gate. A standard cell is both a logic function and its physical layout on a chip.
Multiple standard cells are connected to form a macrocell, which performs a larger function, such as adding or multiplying numbers.
Macrocells can be combined into larger structures, including IP cores, processor cores, and hardware accelerators.
These structures are integrated into a complete chip, such as a CPU.
The analogy describes increasing levels of complexity: simple components are assembled into larger functional units, which are then combined into still more complex systems.
Standard cells and macrocells
Different standard cells use different numbers and arrangements of transistors. For example:
An inverter commonly uses two transistors.
NAND and NOR gates commonly use four.
AND and OR gates commonly use six because each can be built from a four-transistor gate followed by an inverter.
XOR and XNOR gates can use ten transistors in the layouts described here.
A macrocell may contain many standard cells. An example of an adder macrocell uses about 160 standard cells to add two 32-bit numbers. Its two input numbers are carried into the circuit on two groups of 32 wires, and the result is carried out on 33 wires. The extra output bit allows the result to represent a carry beyond the original 32-bit width.
A more complex multiplication macrocell can contain about 6,100 standard cells. The number of cells depends on the function and design; large integrated circuits can contain far more.
Interconnections and wiring hierarchy
Standard cells are connected to one another by conductive wires and vertical connections called vias. Local interconnects connect parts of a cell, while additional wiring layers connect cells and larger circuit blocks.
For example, a higher wiring layer called Metal 1, or M1, can connect standard cells within a macrocell. Larger chip designs use many metal layers—around 17 in the example described—to connect macrocells, IP cores, processor cores, and other sections.
The conductive wiring may use metals such as copper, tungsten, or aluminum. Insulating material, called a dielectric, fills spaces between conductive structures and prevents unintended electrical connections. Although chip diagrams often depict wires and vias as if they were suspended in open space, the spaces around them are filled with this insulation.
2. How transistors act as switches
A transistor in a logic circuit can control whether electricity flows through a channel. The transistor described here is a FinFET, named for its fin-like physical structure.
Its key parts include:
Gate: receives the control voltage.
Channel: the region through which current can flow when the transistor is on.
Dielectric: an insulating barrier between the gate and channel.
Contacts and vias: provide electrical connections to the transistor and to the wiring above it.
In the simplified switching model, applying a high voltage to the gate turns an N-type transistor on, allowing electricity to pass through its channel. Applying a low voltage turns it off, interrupting the path.
A P-type transistor behaves in the opposite way:
A low gate voltage turns it on.
A high gate voltage turns it off.
The gate controls the channel; it does not simply act like a wire carrying the output current. The faucet analogy captures the switching behavior: the gate is like a handle that determines whether a path for flow is open or closed. The N-type and P-type devices respond oppositely to that control.
N-type and P-type transistors together
N-type and P-type transistors are often paired. They can share an input signal at their gates, so one input controls both devices:
With a low input, the P-type device is on and the N-type device is off.
With a high input, the N-type device is on and the P-type device is off.
This complementary behavior is central to CMOS logic circuits. It allows one transistor type to provide a path to the power supply while the other provides a path to ground, depending on the input.
3. The CMOS inverter
An inverter, also called a NOT gate, reverses its input: a logic 1 becomes a logic 0, and a logic 0 becomes a logic 1.
A standard CMOS inverter uses one P-type transistor and one N-type transistor. Their gates share the input, and their joined output is positioned between them electrically. The P-type device connects the output toward the power rail; the N-type device connects it toward ground.
The power rail is held at a high voltage, represented as logic 1 (approximately 1V in the simplified example). The ground rail is held at a low voltage, represented as logic 0.
Inverter operation
Input is logic 1.
The N-type transistor turns on, while the P-type transistor turns off. The output is connected through the N-type channel to ground, so the output becomes logic 0.Input is logic 0.
The P-type transistor turns on, while the N-type transistor turns off. The output is connected through the P-type channel to the power rail, so the output becomes logic 1.
Thus, the inverter’s input-output behavior is:
Input 0: output 1
Input 1: output 0
The output is not a separate decision made by software. It results from the transistor states creating a conductive path to either the power rail or ground.
Physical layout and circuit schematic
A standard-cell layout shows the physical arrangement of transistors, contacts, vias, and wires. A circuit schematic instead emphasizes electrical connections and logical function. The same inverter can therefore be represented as:
A logic symbol showing a NOT operation.
A transistor schematic showing the P-type and N-type devices.
A physical layout showing where the devices and interconnects are placed on the chip.
These representations describe the same circuit at different levels of detail.
4. NAND and NOR gates
A NAND gate performs AND followed by NOT. Its output is 0 only when every input is 1; otherwise, its output is 1.
A two-input CMOS NAND gate uses:
Two P-type transistors in parallel between the power rail and output.
Two N-type transistors in series between the output and ground.
The inputs control transistor gates, with each input connected to a corresponding P-type and N-type device.
Why the NAND arrangement works
A P-type transistor turns on when its input is 0. Because the P-type devices are in parallel, either one can provide a path from the power rail to the output. Therefore, if either input is 0, the output can be pulled high.
An N-type transistor turns on when its input is 1. Because the N-type devices are in series, both must be on to form a complete path from the output to ground. Therefore, the output is pulled low only when both inputs are 1.
The two-input behavior is:
Inputs 0,0: output 1
Inputs 0,1: output 1
Inputs 1,0: output 1
Inputs 1,1: output 0
A NOR gate performs OR followed by NOT. Its CMOS arrangement reverses the NAND series-parallel pattern:
P-type transistors are in series.
N-type transistors are in parallel.
The NOR output is 1 only when all inputs are 0. If any input is 1, the circuit provides a path that pulls the output low.
5. AND and OR gates
An AND gate outputs 1 only when all its inputs are 1. A two-input AND can be built from a NAND gate followed by an inverter:
The NAND gate produces the opposite of the desired AND result.
The inverter reverses that result.
For two inputs, the output is 1 only for inputs 1,1; all other input combinations produce 0.
An OR gate outputs 1 when at least one input is 1. It can be built from a NOR gate followed by an inverter. The NOR gate first produces the opposite of the OR result, and the inverter reverses it.
This illustrates an important design principle: more complex logic functions can be assembled from simpler logic gates. In a standard-cell library, a function may be implemented as a single designed cell or as a combination of other cells, depending on the design.
6. XOR and XNOR gates
An exclusive OR (XOR) gate outputs 1 when its two inputs differ. For two inputs, it behaves as follows:
Inputs 0,0: output 0
Inputs 0,1: output 1
Inputs 1,0: output 1
Inputs 1,1: output 0
An exclusive NOR (XNOR) gate is the complement of XOR. It outputs 1 when its inputs are the same and 0 when they differ.
XOR and XNOR circuits are more complex than an inverter or a basic NAND gate. The layouts described here use ten transistors each. Their transistor networks must implement the condition that exactly one of two inputs is high for XOR, or that both inputs match for XNOR.
The same principles extend to multiple inputs:
A multi-input AND outputs 1 only if every input is 1.
A multi-input XOR outputs 1 when an odd number of inputs are 1.
A multi-input XNOR outputs 1 when an even number of inputs are 1.
These behaviors make XOR and XNOR useful for logic tasks involving comparisons and parity.
7. CMOS properties and circuit timing
The circuits described are examples of CMOS, short for complementary metal-oxide-semiconductor. The name reflects the use of complementary N-type and P-type transistors.
CMOS circuits have two important properties:
Low static power consumption: in a correctly designed complementary circuit, one transistor network is off when the other is on. This generally prevents a continuous path from the power rail to ground in a stable logic state.
High noise tolerance: the circuit can tolerate some variation in voltage without mistaking a logic 0 for a logic 1, or vice versa.
CMOS logic changes state rapidly. The input voltage changes, the transistor states respond, and the resulting output propagates through the circuit. The example describes an inverter-scale transition as taking a few picoseconds; one picosecond is 10−12 seconds.
A multiplication macrocell containing more than 6,000 standard cells is described as taking roughly 150–200 picoseconds for its computation. This is a circuit-level timing estimate, not a claim that every cell must operate one after another: the overall delay depends on how the circuit is structured and how signals propagate through it. In general, circuit delay depends on the transistors, wiring, loads, and organization of the logic.
8. From standard cells to processor capability
A single transistor is only a controllable electrical switch. A single logic gate performs only a basic operation. Their significance comes from combining them into large, organized networks.
At a small scale, transistors form standard cells. Standard cells form macrocells that carry out tasks such as addition and multiplication. Larger functional units and cores combine these building blocks, and a complete processor integrates many such structures.
A modern CPU therefore consists not merely of a large number of transistors, but of billions of transistors organized into layers of connected logic and wiring. The network enables the processor to carry out the many operations required by software, from basic arithmetic to demanding applications.

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