Skip to main contentSkip to navigation
ThisIsHowItWorks.in

Complex systems, clearly explained.

An independent visual publication explaining the invisible protocols, networks, infrastructure, and mechanisms that run our world.

Explainers

  • How UPI Works
  • Offline UPI Mechanisms
  • All Explainers (Archive)
  • Topics & Roadmap
  • Curated Library

Publication

  • About Publication
  • Editorial Principles
  • Theme Index
  • Technical Lexicon
  • Open Questions
  • Changelog
  • RSS / Atom Feed

Legal & Contact

  • Privacy Policy
  • Terms of Use
  • Editorial & Legal Notice
  • Contact Us

Connect

  • Instagram
  • Discord Community
© 2026 ThisIsHowItWorks.in. All rights reserved.
Durable technical understanding built from first principles.
ThisIsHowItWorks.in
ExploreTopicsPathsAbout
  1. Home
  2. /Topics
  3. /Physics & Fundamental Laws
  4. /Physics & Fundamental Laws
  5. /How Semiconductors and Transistors Actually Work
Physics · Physics/ Explainer

How Semiconductors and Transistors Actually Work

From silicon crystal lattices and P-N junctions to the quantum bandgap, MOSFET gate fields, and solid-state switching

18 min read·Updated for clarity
The Short AnswerFirst-Principles Core

“How does a microscopic slice of treated sand conduct or block electricity on command without any moving parts?”

Before semiconductors, computers relied on hot, fragile vacuum tubes. The solid-state transistor replaced thermionic bulbs with silicon quantum mechanics. By doping crystals with phosphorus or boron, engineers create N-type electrons and P-type holes around a depletion barrier. In modern MOSFETs, an electrostatic gate field opens a conductive channel, switching digital currents billions of times per second.

What This Explainer Answers
  • Why is pure silicon an electrical insulator at room temperature?
  • What does doping silicon with phosphorus or boron actually do at the atomic level?
  • What is an electron 'hole' and how does it move through a crystal?
  • How does a P-N junction create a one-way electrical valve (diode)?
  • What is the depletion region and why does it stop current from flowing?
  • How does a MOSFET use an electric field to turn a channel on and off?
  • Why did solid-state transistors replace vacuum tubes and make microprocessors possible?
Recommended Background
Relationship: Requires understanding of

To build a complete first-principles mental model of this mechanism, we recommend starting with these foundational explainers:

Requires understanding of
How Humans Discovered Electricity
Understanding How Humans Discovered Electricity is required before reading How Semiconductors and Transistors Actually Work
Requires understanding of
How Quantum Mechanics Redefined Reality
Understanding How Quantum Mechanics Redefined Reality is required before reading How Semiconductors and Transistors Actually Work
In this Explainer10 Sections
  1. 01The Question That Changed Civilization
  2. 02The Architecture of Silicon: Why Pure Sand Is an Insulator
  3. 03The Quantum Ladder: Valence and Conduction Bands
  4. 04The Masterstroke: Doping Silicon
  5. 05The P-N Junction: The One-Way Gate
  6. 06Bias: Opening and Locking the Gate
  7. 07The True Revolution: The MOSFET
  8. 08Why the MOSFET Changed the Universe
  9. 09CMOS: How 0 and 1 Consume Zero Power
  10. 10The Physical Foundation of Digital Thought

The Question That Changed Civilization

In 1946, the world’s most advanced electronic computer was the ENIAC (Electronic Numerical Integrator and Computer) at the University of Pennsylvania. It weighed 30 tons, occupied a 30-by-50-foot room, and consumed 150 kilowatts of electrical power—enough to run a modern suburban neighborhood.

Inside ENIAC were 17,468 vacuum tubes: hollow glass bulbs containing glowing metallic filaments.

Vacuum tubes worked, but they had a fatal mechanical flaw. Like incandescent lightbulbs, their heated filaments boiled off electrons through thermionic emission. They ran scorching hot, required hundreds of volts, and burned out constantly. On an average day, several tubes blew out during operation, halting military ballistics calculations while technicians crawled inside the machine with flashlights to locate and replace dead glass bulbs.

Engineers calculated that a computer with 100,000 vacuum tubes would be mathematically impossible to operate: tubes would burn out faster than technicians could swap them.

To break past this ceiling, humanity needed a switch that had no glowing filaments, no fragile glass vacuums, no high voltages, and no mechanical moving parts.

It needed a way to control the flow of electricity entirely within a cold, solid lump of matter.

That machine is the semiconductor transistor. Today, a single silicon chip smaller than your fingernail inside a smartphone contains over 15 billion transistors, each switching billions of times per second for years without burning out.

Here is the microscopic physics of how a treated grain of common beach sand became the brain of human civilization.


The Architecture of Silicon: Why Pure Sand Is an Insulator

To understand how a transistor switches, you must first look at the atomic architecture of Silicon (chemical symbol Si, atomic number 14).

Silicon is the second most abundant element in Earth’s crust, making up roughly 28% of its mass, primarily in the form of quartz sand (SiO2).

An isolated atom of silicon has 14 protons in its nucleus and 14 electrons orbiting around it. These electrons arrange themselves in shells:

  • 2 in the inner shell
  • 8 in the middle shell
  • 4 in the outermost valence shell
                  THE SILICON ATOM
                     
                       [ 2 ]   Inner shell (full)
                       [ 8 ]   Middle shell (full)
                     ──[ 4 ]── Valence shell (wants 8 to be stable)

Atoms are chemically stable when their outermost valence shell contains 8 electrons (the octet rule, explored in How the Periodic Table Organizes the Elements). Because silicon has exactly 4 valence electrons, it does not want to give them up (like an alkali metal), nor does it greedily strip electrons from other atoms (like a halogen).

Instead, in a solid crystal, each silicon atom forms covalent bonds (see How Chemical Bonds Actually Form) with four neighboring silicon atoms. Each atom shares one electron with each neighbor, creating an orderly, rigid three-dimensional tetrahedral lattice known as the diamond cubic crystal structure:

       PURE SILICON CRYSTAL LATTICE (ROOM TEMPERATURE)

            :           :           :
        ... Si : : : :  Si : : : :  Si ...
            :           :           :
            :           :           :
        ... Si : : : :  Si : : : :  Si ...
            :           :           :
            :           :           :
        ... Si : : : :  Si : : : :  Si ...
            :           :           :

     (All 4 valence electrons tightly bound in covalent bonds;
      zero free electrons available to carry electrical current)

In this pure crystal, every single valence electron is locked in place, binding the atoms together.

For an electric current to flow through any material, two conditions must be met:

  1. There must be charged particles (electrons).
  2. Those charged particles must be free to move.

In pure silicon at absolute zero (−273.15∘C), there are zero free electrons. Every electron is tied to its chemical bond. Pure silicon is therefore a complete electrical insulator.

Even at room temperature, thermal vibration only knocks an occasional electron loose—roughly one in every 100 billion atoms. This is called an intrinsic semiconductor, and its electrical conductivity is far too feeble to be useful in an electronic circuit.


The Quantum Ladder: Valence and Conduction Bands

In quantum physics, an electron inside a crystal lattice cannot possess arbitrary energy. It is restricted to specific energy bands:

  Energy (E)
      ▲
      │    ┌───────────────────────────────┐
      │    │        CONDUCTION BAND        │  ◄── Electrons here are free
      │    │    (Empty in pure crystal)    │      to move and carry current
      │    └───────────────────────────────┘
      │
      │         ▲ BANDGAP ENERGY (Eg)
      │         │ (Silicon: ~1.12 eV)      ◄── FORBIDDEN ZONE
      │         ▼
      │    ┌───────────────────────────────┐
      │    │         VALENCE BAND          │  ◄── Electrons locked in
      │    │    (Completely full of e⁻)    │      covalent atomic bonds
      │    └───────────────────────────────┘
      └────────────────────────────────────────►
  • The Valence Band: The low energy level where electrons remain locked in covalent bonds between atoms.
  • The Conduction Band: The higher energy level where electrons break free from their atoms and can drift through the crystal lattice under an applied voltage.
  • The Bandgap (Eg): The forbidden energy gulf between the two bands. No electron can exist with an energy inside this gap.

In conductors (like copper or gold), the valence band and conduction band overlap (Eg = 0). Copper electrons move with the slightest nudge of voltage.

In insulators (like glass or diamond), the bandgap is enormous (Eg > 5 eV). Knocking an electron into the conduction band requires so much energy that the material burns or shatters before it conducts.

In semiconductors (like silicon, Eg ≈ 1.12 eV), the bandgap is modest. It is too large for electrons to cross easily on their own, but small enough that physicists can manipulate it.

The breakthrough of semiconductor engineering was the realization that we do not have to wait for heat to kick electrons across the bandgap. We can alter the crystal’s electrical behavior permanently by sprinkling in foreign atoms.

This chemical modification is called doping.


The Masterstroke: Doping Silicon

Doping does not mean contaminating silicon with random impurities. It is the ultra-precise substitution of one foreign atom for every one million to ten million silicon atoms inside an ultra-pure crystal (purified to 99.9999999% purity, or "nine nines").

Engineers use two distinct types of dopants to create two distinct types of silicon: N-type and P-type.

                  THE TWO FACES OF DOPED SILICON

      N-TYPE (Phosphorus / Arsenic)        P-TYPE (Boron / Gallium)
      Group V: 5 valence electrons         Group III: 3 valence electrons
      
           :           :                        :           :
       ... Si : : : :  Si ...               ... Si : : : :  Si ...
           :           :                        :           :
           :   e⁻ (Extra electron)              :   [ ] (Missing electron: "Hole")
       ... Si : : : :  P  ...               ... Si : : : :  B  ...
           :           :                        :           :
       ... Si : : : :  Si ...               ... Si : : : :  Si ...
           :           :                        :           :

       Negative charge carriers             Positive charge carriers
       (Mobile electrons)                   (Mobile positive holes)

1. N-Type Silicon: Creating Negative Mobile Carriers

To create N-type ("negative") silicon, engineers introduce trace amounts of an element from Group V of the periodic table, usually Phosphorus (P) or Arsenic (As).

Phosphorus has 5 valence electrons. When a phosphorus atom slips into the silicon lattice, four of its valence electrons form tight covalent bonds with the neighboring silicon atoms.

The fifth electron has no bond to hold it.

Because it does not participate in a bond, this fifth electron is bound to the phosphorus nucleus by a tiny fraction of energy—only about 0.045 eV. At room temperature, ordinary ambient thermal energy kicks this fifth electron straight into the conduction band.

The electron is now free to wander through the crystal as a mobile charge carrier.

Because phosphorus "donates" a free electron, it is called a donor impurity. The silicon now has an abundance of negatively charged mobile electrons.

2. P-Type Silicon: Creating Positive "Holes"

To create P-type ("positive") silicon, engineers dope pure silicon with an element from Group III of the periodic table, usually Boron (B).

Boron has only 3 valence electrons. When boron takes the place of a silicon atom in the crystal, it shares its 3 electrons with three neighboring silicon atoms. But with the fourth neighbor, there is an empty seat: an unfulfilled covalent bond.

This missing electron in a bond is called an electron hole (or simply a hole).

A hole is not a physical particle; it is the absence of an electron where one ought to be. However, physics treats it as a mobile particle with a positive electrical charge (+1.602 × 10−19 C).

Why does a hole move?

Imagine a row of ten parking spaces with nine cars and one empty spot at the left end:

Position:    [ 1 ]  [ 2 ]  [ 3 ]  [ 4 ]  [ 5 ]
Initial:     [   ]  [🚗]  [🚗]  [🚗]  [🚗]   ◄── Empty space at #1
Step 1:      [🚗]  [   ]  [🚗]  [🚗]  [🚗]   ◄── Car moves left; space moves right to #2
Step 2:      [🚗]  [🚗]  [   ]  [🚗]  [🚗]   ◄── Car moves left; space moves right to #3
Step 3:      [🚗]  [🚗]  [🚗]  [   ]  [🚗]   ◄── Space moves to #4

When the car in space #2 moves left into space #1, the empty space moves right to #2. When the car in space #3 moves into space #2, the empty space moves to #3.

The physical objects (cars/electrons) move to the left. But the hole moves to the right.

In P-type silicon, an electron from an adjacent covalent bond jumps over to fill the boron atom's empty bond. That leaves behind a new hole at the adjacent atom. As electrons leap from bond to bond toward a positive voltage, the positively charged hole drifts smoothly toward the negative voltage.

Because boron "accepts" an electron from a neighbor, it is called an acceptor impurity.


The P-N Junction: The One-Way Gate

If you take a piece of N-type silicon and a piece of P-type silicon in isolation, both conduct electricity reasonably well. Neither is a switch.

The magic happens when you join them together inside a single continuous crystal lattice: the P-N Junction.

               THE ANATOMY OF A P-N JUNCTION AT EQUILIBRIUM

          P-TYPE REGION        DEPLETION REGION        N-TYPE REGION
     (Mobile Positive Holes)   (No Free Carriers)   (Mobile Free Electrons)
    ┌─────────────────────────┬───────────────────┬─────────────────────────┐
    │                         │   Fixed   Fixed   │                         │
    │   (+)   (+)   (+)   (+) │  Negative Positive│   (-)   (-)   (-)   (-)   │
    │                         │    Ions    Ions   │                         │
    │   (+)   (+)   (+)   (+) │   [ ⊖ ]   [ ⊕ ]   │   (-)   (-)   (-)   (-)   │
    │                         │                   │                         │
    │   (+)   (+)   (+)   (+) │   [ ⊖ ]   [ ⊕ ]   │   (-)   (-)   (-)   (-)   │
    │                         │                   │                         │
    │   (+)   (+)   (+)   (+) │   [ ⊖ ]   [ ⊕ ]   │   (-)   (-)   (-)   (-)   │
    └─────────────────────────┴───────────────────┴─────────────────────────┘
                              │◄── Built-in ────►│
                              │   Electric Field  │
                              │      (E-field)    │
                              │        ◄───       │

The moment the P-type and N-type regions meet, intense Brownian diffusion occurs:

  1. Free electrons in the N-region look across the boundary and see a P-region with virtually zero free electrons. They diffuse across the boundary into the P-side.
  2. Positive holes in the P-region diffuse across the boundary into the N-side.
  3. Near the boundary, migrating electrons fall into migrating holes and cancel each other out (recombination).

You might expect this diffusion to continue until the entire crystal is neutral. But it cannot.

When an electron leaves the N-side, it abandons the phosphorus atom it came from. The phosphorus atom has 15 protons and now only 14 electrons: it has become a fixed positive ion (P+) locked rigidly into the crystal lattice.

When that electron crosses into the P-side and fills a hole in a boron atom, that boron atom now has 5 protons and 6 electrons: it has become a fixed negative ion (B−).

Unlike electrons and holes, these ionized donor and acceptor atoms cannot move. They are welded into the crystal.

As more carriers diffuse, a wall of positive ions builds up on the N-side of the boundary, and a wall of negative ions builds up on the P-side of the boundary.

This zone stripped of all mobile charge carriers is called the Depletion Region.

The Equilibrium Barrier

The fixed ions create a permanent internal electric field pointing from the positive N-side back toward the negative P-side.

This electric field exerts an electrostatic force that repels any further electrons trying to cross from N to P, and repels any further holes trying to cross from P to N.

At room temperature in silicon, this internal barrier stabilizes at approximately 0.7 Volts.

Without any battery connected, current ceases entirely. The depletion region acts as an impenetrable insulating wall in the middle of the crystal.


Bias: Opening and Locking the Gate

Now connect an external battery to the P-N junction. Two things can happen depending on which way you wire the terminals:

                REVERSE BIAS (NO CURRENT FLOWS)
                
             (-) Battery Terminal       (+) Battery Terminal
                     │                           │
                     ▼                           ▼
              ┌───────────────┬─────────┬───────────────┐
              │    P-Type     │DEPLETION│    N-Type     │
              │  (Holes (-)   │ REGION  │(Electrons (+) │
              │ pulled away)  │ WIDENS! │ pulled away)  │
              └───────────────┴─────────┴───────────────┘
                              │◄───────►│

1. Reverse Bias (The Valve Closes)

Connect the negative terminal of a battery to the P-side and the positive terminal to the N-side:

  • The positive battery terminal attracts mobile electrons away from the junction on the N-side.
  • The negative battery terminal attracts mobile holes away from the junction on the P-side.
  • The depletion region widens. The electrostatic barrier grows taller.

Except for a microscopic quantum leakage current (nanoamperes), zero electricity flows. The junction is an open switch.

                FORWARD BIAS (MASSIVE CURRENT FLOWS)
                
             (+) Battery Terminal       (-) Battery Terminal
                     │                           │
                     ▼                           ▼
              ┌───────────────┬───┬───────────────┐
              │    P-Type     │DEP│    N-Type     │
              │(Holes pushed  │ L │(Electrons push│
              │ toward center)│   │ toward center)│
              └───────────────┴───┴───────────────┘
                                ▲
                     Barrier collapses (>0.7V)
                     Electrons flood across junction!

2. Forward Bias (The Valve Opens)

Now reverse the battery: connect the positive terminal to the P-side and the negative terminal to the N-side:

  • The negative terminal repels electrons on the N-side, pushing them toward the junction.
  • The positive terminal repels holes on the P-side, pushing them toward the junction.
  • Once the external voltage exceeds the internal barrier voltage (≈ 0.7 V), the depletion region collapses.

Electrons flood across the junction into the P-side and flow into the battery terminal. A massive, continuous current surges through the crystal.

The P-N junction is a diode: a solid-state, one-way electrical check valve.


The True Revolution: The MOSFET

A diode is useful for converting AC to DC, but it is not a computer switch. A computer switch must be a three-terminal device:

  • Current enters through Terminal 1 (Source).
  • Current exits through Terminal 2 (Drain).
  • A third control terminal (Gate) turns the connection between Source and Drain ON or OFF without touching the current itself.

The device that runs every computer on Earth today is the MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor).

                   ANATOMY OF AN N-CHANNEL MOSFET (NMOS)

                         Gate Terminal (Control Voltage: V_G)
                                       │
                                       ▼
                              ┌─────────────────┐
                              │  Metal / Poly   │  ◄── GATE TERMINAL
                        ┌─────┴─────────────────┴─────┐
                        │ Dielectric Oxide (SiO₂ / Hf)│  ◄── INSULATOR (~1 nm)
     SOURCE             └─────────────────────────────┘             DRAIN
    Terminal                                                      Terminal
       │                                                             │
       ▼                                                             ▼
  ┌───────────┐                                                 ┌───────────┐
  │  N+ Well  │                                                 │  N+ Well  │
  │ (Heavy e⁻)│                                                 │ (Heavy e⁻)│
  └─────┬─────┴─────────────────────────────────────────────────┴─────┬─────┘
        │                CONDUCTIVE INVERSION CHANNEL                 │
        │             (Forms when Gate Voltage V_G > V_th)            │
        │                                                             │
        └────────────────────── P-TYPE SUBSTRATE ─────────────────────┘
                                 (Silicon Body)

The diagram below traces the structural hierarchy of a modern semiconductor transistor:

The Solid-State Hierarchy from Silicon Crystal to MOSFET Switch
Silicon Crystal Lattice14-proton atoms sharing 4 valence electrons in rigid tetrahedral covalent diamond-cubic bonds.
Extrinsic DopingSelective phosphorus (N-type, mobile electrons) and boron (P-type, mobile holes) substitution across lattice.
P-N Junction & DepletionDiffusing carriers recombine leaving fixed space charge creating a self-limiting 0.7V barrier.
Dielectric Gate StackNanometer-thin insulating hafnium-oxide barrier separating control electrode from silicon channel.
MOSFET Inversion ChannelGate electric field electrostatically pulls electrons to surface, completing switch in picoseconds.
Layered architectural diagram tracing semiconductor physics from raw silicon diamond-cubic crystal lattice, donor and acceptor chemical doping, the formation of P-N junctions and depletion regions, up to the electrostatic gate channel inversion in a modern CMOS MOSFET.

How a MOSFET Switches: The Field Effect

Look closely at the NMOS diagram above:

  1. The Source is a heavily doped N-type region (N+) full of free electrons.
  2. The Drain is another heavily doped N-type region (N+) full of free electrons.
  3. Between them lies the P-type substrate, which is full of holes and contains virtually no free electrons.
  4. Directly above the gap between Source and Drain sits a microscopically thin insulating layer: the gate dielectric (historically Silicon Dioxide, SiO2; today high-κ dielectrics like Hafnium Oxide).
  5. Atop this insulator sits the conductive Gate electrode.

Because the gate dielectric is a physical electrical insulator, no electrons can ever flow from the gate into the silicon. The gate is a capacitor.

Now look at what happens in the two states:

State 0: Gate Voltage is Zero (VG = 0 V)

You connect a voltage between Source and Drain, trying to pull electrons from Source to Drain.

Can they move?

No. Between Source (N+) and the P-substrate lies a reverse-biased P-N junction. The path is blocked by the depletion region.

The resistance between Source and Drain is virtually infinite (>1010 Ω). The switch is OFF.

State 1: Positive Gate Voltage Applied (VG > Vthreshold)

You apply a positive voltage (such as +0.8 V) to the Gate electrode.

Because of the insulating oxide layer, no current flows into the gate. Instead, the positive charge on the gate creates an intense transverse electric field radiating down through the oxide into the P-type silicon below.

This electric field does two things simultaneously:

  1. It repels positive holes in the P-substrate downwards, pushing them away from the surface.
  2. It attracts the rare minority electrons in the P-substrate upwards toward the bottom of the oxide.

When the gate voltage crosses a critical threshold (Vth, typically 0.2–0.4 V), the concentration of attracted electrons at the surface becomes greater than the concentration of holes.

The surface of the P-type silicon temporarily flips its electrical character, turning into N-type silicon!

This thin surface layer of attracted electrons is called the Inversion Layer or the Conductive Channel.

The channel forms a direct, unbroken bridge of free electrons connecting the N-type Source directly to the N-type Drain:

Source (N+) ═════════► [ Inversion Channel: Free e⁻ ] ═════════► Drain (N+)

Electrons rush across the bridge under the influence of the Source-Drain voltage. The resistance collapses from millions of ohms to a few hundred ohms. The switch is ON.

When you turn the gate voltage back to zero, the electric field collapses. The electrons in the channel disperse back into the crystal within picoseconds. The channel vanishes. The switch turns OFF.


Why the MOSFET Changed the Universe

The beauty of the field-effect transistor lies in its mechanical simplicity and efficiency:

  1. Pure Electrostatic Control: Because the gate is insulated by oxide, turning the switch ON requires no continuous current flow through the gate. It only takes a momentary surge to charge the gate capacitor.
  2. Zero Moving Components: A MOSFET switch has no springs, contacts, or filaments. It switches via the quantum redistribution of electrons inside a solid crystal lattice. It never wears out from physical friction.
  3. Extreme Miniaturization: In 1971, the Intel 4004 microprocessor had transistors with a gate length of 10,000 nm (10 microns). Today, leading-edge chips are manufactured on commercial "3-nanometer" nodes. While "3nm" is a commercial naming convention reflecting overall transistor density rather than an actual 3 nm physical gate length (physical gate lengths in 3nm-class FinFET and Gate-All-Around nanosheets remain around 12 to 18 nm to prevent direct quantum mechanical source-to-drain tunneling), the physical channel remains thin enough that a handful of atoms govern the entire switch.
  4. Blazing Speed: Because electrons only need to travel a distance of a few nanometers across the inversion channel, a transistor can switch from OFF to ON in less than 10 picoseconds (10−11 seconds). This is what allows CPUs to run at clock speeds exceeding 4 Gigahertz (4 billion cycles per second).

CMOS: How 0 and 1 Consume Zero Power

In early computers, transistors were wired with pull-up resistors. When the switch was ON, current flowed continuously from the power supply directly to ground, generating enormous heat even when the computer wasn't actively computing.

In 1963, Frank Wanlass at Fairchild Semiconductor invented CMOS (Complementary Metal-Oxide-Semiconductor).

CMOS pairs two opposite types of transistors together:

  • NMOS (turns ON when gate is HIGH/1; turns OFF when gate is LOW/0)
  • PMOS (turns ON when gate is LOW/0; turns OFF when gate is HIGH/1)
               THE FUNDAMENTAL CMOS INVERTER (NOT GATE)

                           +V_DD (Power Supply: e.g. 1.0 V)
                                       │
                                 ┌─────┴─────┐
                                 │   PMOS    │  ◄── Turns ON when Input is 0
                                 └─────┬─────┘
                                       │
                INPUT ─────────────────┼──────────────── OUTPUT
                                       │
                                 ┌─────┴─────┐
                                 │   NMOS    │  ◄── Turns ON when Input is 1
                                 └─────┬─────┘
                                       │
                                      GND (0 V)

Look at what happens in both logical states:

  • When Input is 0 (0 V): The PMOS turns ON, connecting the Output to +VDD (Logical 1). The NMOS turns OFF, disconnecting ground.
  • When Input is 1 (1 V): The NMOS turns ON, connecting Output to Ground (Logical 0). The PMOS turns OFF, disconnecting +VDD.

In both states, one of the two transistors is always completely OFF. There is never an open path connecting the power supply to ground!

A CMOS logic circuit consumes virtually zero electrical power while resting in a steady state (storing a 0 or a 1). It only consumes significant energy during the microscopic instant of switching, when both transistors momentarily transition.

By pairing NMOS and PMOS switches, engineers can assemble AND, OR, NOT, and XOR gates that consume minimal power and emit minimal heat—making it possible to pack 15 billion transistors into an iPhone without melting the casing in your pocket.


The Physical Foundation of Digital Thought

Every calculation in computer science—from adding two integers to calculating orbital mechanics, running an operating system, or sampling tokens in an artificial intelligence—is an abstract mathematical concept.

Yet that abstraction exists entirely as an illusion.

Beneath the software lies an architecture of physical logic gates (as explored in How Binary and Logic Gates Became Computation) orchestrated by clocked instruction decoders (as shown in How a CPU Executes an Instruction).

And beneath those gates lies the quantum physics of solid silicon:

  • Millions of phosphorus atoms donating free electrons to N-wells.
  • Boron atoms creating mobile positive holes in P-substrates.
  • Depletion barriers holding back electrical currents.
  • Dielectric oxide gates exerting electrostatic force to summon temporary inversion channels at the speed of light.

A microprocessor is not magic. It is an intricate city of billions of solid-state electronic valves etched into crystallized sand, synchronized by electricity, turning the fundamental laws of quantum electrodynamics into human thought.

To see how these billions of nanoscale gates are optically printed onto silicon using Extreme Ultraviolet laser-produced plasma and Carl Zeiss Bragg mirrors, explore How Photolithography Prints Billions of Transistors on a Silicon Wafer. To understand the stimulated emission and population inversion principles powering both semiconductor laser diodes and high-power lithography lasers, see How Lasers Generate Coherent Light.

(To see how engineers modified the MOSFET by inserting an electrically isolated floating gate or silicon nitride trap layer to store bits for years without power, read How Solid-State Drives (SSDs) and Flash Memory Store Data Without Power; to trace how human source code is compiled into the binary instructions controlling these gates, explore How Compilers Translate Human Code into Machine Instructions.)

Guided Learning Path · Step 1 of 8
View Full Path (8 Steps)

How Computers Execute and Store Information

Starting question: “How does purified quartz sand doped with boron and phosphorus become a microprocessor capable of executing billions of arithmetic instructions and running an operating system every second?”

Why This Step Matters in the Path

Explains how doping silicon crystals creates p-n junctions and voltage-controlled MOSFET switches with zero moving parts.

Conceptual Progression
1.How Semiconductors and Transistors Actually Work→
2.How Binary and Logic Gates Became Computation→
3.How CMOS Transistors Form Logic Gates→
4.How Binary Arithmetic Logic Units Actually Add Numbers→
5.How a CPU Executes an Instruction→
6.How CPU Cache Hierarchies Overcome the Memory Wall→
7.How an Operating System Actually Runs Software→
8.How Compilers Translate Human Code into Machine Instructions
Next Step (2/8)
How Binary and Logic Gates Became Computation
Core Concepts Introduced10 Concepts
Silicon Crystalline LatticeValence Band and Conduction BandBandgap EnergyIntrinsic vs Extrinsic SemiconductorsN-Type Doping (Donors)P-Type Doping (Acceptors & Holes)P-N Junction & Depletion LayerBuilt-in Electric PotentialMOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor)Gate Dielectric & Channel Inversion
Knowledge Graph Connections

Where to Go From Here

Follow downstream mechanisms, contrasting architectures, or applications of these principles.

Answers next question24 min read

How Did We Discover the Electron?

How did 19th-century physicists discover that the indivisible atom has internal parts, and how did measuring the electron's charge-to-mass ratio prove the existence of subatomic particles?

Explore How Did We Discover the Electron?
Answers next question25 min read

How General Relativity Warps Spacetime and Bends Light

Why is gravity not an invisible pulling force, but an illusion created by the curvature of four-dimensional spacetime?

Explore How General Relativity Warps Spacetime and Bends Light
Answers next question24 min read

How Do Lasers Generate Coherent, Monochromatic Light?

How does an optical device force trillions of independent excited atoms to emit photons with identical frequency, identical phase, and a shared direction in a single laser beam?

Explore How Do Lasers Generate Coherent, Monochromatic Light?
Answers next question25 min read

How Nuclear Reactors Maintain and Control a Fission Chain Reaction

How do nuclear power reactors sustain an enormous chain reaction releasing billions of watts of heat without exploding like an atomic bomb, and how do operators stably control a physical process that occurs on microsecond timescales?

Explore How Nuclear Reactors Maintain and Control a Fission Chain Reaction
Research Grounding & Primary Sources

Verified Specifications & Architectural References

3 Authoritative References

This explainer is grounded in primary-source engineering specifications, regulatory circulars, and standard documentation.

Primary SourcePearson (Ben G. Streetman & Sanjay Kumar Banerjee)• 2015

Solid State Electronic Devices (7th Edition)

The classic semiconductor physics textbook detailing carrier transport, energy band diagrams, P-N junction electrostatics, and field-effect transistor modeling.

Primary SourceWiley-Interscience (S. M. Sze & Kwok K. Ng)• 2021

Physics of Semiconductor Devices (4th Edition)

The definitive reference manual for device physicists, covering exact Poisson equation solutions across depletion zones and sub-micron MOSFET scaling.

Oxford University Press (H. M. Rosenberg)• 1988

The Solid State: An Introduction to the Physics of Crystals for Students of Physics, Materials Science, and Engineering

Clear pedagogical introduction to crystallography, covalent bonding, electronic band structures, and thermal generation of charge carriers.

Previous ExplainerHow Quantum Mechanics Redefined RealityNext Explainer How Special Relativity Warps Space and Time
More from Physics & Fundamental Laws•Topic Hub: Physics & Fundamental Laws
Ground Truth Engineering Publication