Skip to content
Tactiverge

Textbooks/Digital Logic and Computer Architecture/Chapter 5

5From silicon to switches

Version 1 · Technically checked (automated checks only) · 3 source lessons · 7 practice items

Text
All chapters and search
  1. 1. Information as bits
  2. 2. Logic gates and Boolean algebra
  3. 3. Combinational building blocks
  4. 4. Binary arithmetic
  5. 5. From silicon to switches
  6. 6. State machines and sequential logic
  7. 7. Instructions and the datapath
  8. 8. Performance and pipelining
  9. 9. The memory hierarchy
  10. 10. Power, performance and the chip

Introduction

Gates are made of transistors, and transistors are made of doped silicon. This chapter goes down a level: why silicon is a semiconductor, how adding small amounts of other elements creates p-type and n-type regions, how a MOSFET acts as a voltage-controlled switch, and how pairing two kinds of transistor (CMOS) builds gates that draw almost no current while they sit still.

VDDpMOSYnMOSgroundAApnY0onoff11offon0
Figure 5.1. A CMOS inverter. A pMOS transistor connects the supply VDD to the output Y, and an nMOS transistor connects Y to ground. Input A drives both gates. When A is 0 the pMOS conducts and Y is 1; when A is 1 the nMOS conducts and Y is 0. Only one transistor is on at a time.

Explanation

This chapter is built from 3 School lessons. Each part below is the lesson's own explanation; open the lesson for its predict-and-discover activities.

5.1 Conductors, insulators and why silicon

Copper and glass differ in resistivity by about a hundred billion billion times. Silicon sits in between, and that is why your phone works.

Resistivity: a property of the material

Resistivity (ρ, in ohm-metres) says how strongly a material opposes current, whatever its shape. Copper is about 1.7 × 10⁻⁸ Ω·m, glass around 10¹² Ω·m. Conductors, semiconductors and insulators are three bands on that enormous scale.

Free carriers make the difference

Current needs charges free to move. In a metal, each atom lends electrons to a shared 'sea', so there are vast numbers of free carriers. In an insulator, electrons are tightly bound. The band picture says the same thing: to move, an electron must jump an energy gap, which is zero in metals, small in semiconductors (1.1 eV for silicon) and large in insulators (about 9 eV for glass).

Semiconductors can be tuned

In pure silicon, heat lifts a few electrons across the gap, so warming it lowers its resistance. Adding a few impurity atoms per million, called doping, supplies extra carriers and cuts resistivity by millions of times. N-type doping adds electrons; p-type creates 'holes'. Joining the two makes diodes and transistors.

Why silicon?

Silicon is the second most common element in Earth's crust (it is in sand). It grows a tough, insulating oxide layer that chipmakers use to build transistors. Its gap is wide enough to work reliably when hot, yet doping controls it precisely. Germanium came first, but heat frees too many of its electrons.

Common mix-ups

  • Semiconductors are just bad conductors.
    ✓ Their resistance can be changed enormously by temperature, light and doping. That controllability is what makes them useful.
  • All materials resist more when they get hot.
    ✓ Metals do, a little. Semiconductors usually resist much less when hot.

Open the full lesson: Conductors, insulators and why silicon →

5.2 Doped silicon and the p–n junction

Pure silicon barely conducts. Add one phosphorus atom for every few million silicon atoms and it conducts thousands of times better. Why so dramatic?

Doping

Pure silicon has very few free charge carriers at room temperature. n-type silicon is doped with atoms like phosphorus (5 outer electrons), adding free electrons. p-type is doped with boron (3), adding holes: gaps that move like positive charges. Tiny amounts change conductivity enormously because pure silicon starts with so few carriers.

The junction

Where p meets n, electrons and holes near the boundary combine, leaving a thin depletion region with no free carriers and a built-in voltage across it. Push current forward (p positive) and, above about 0.6–0.7 V for silicon, the barrier collapses and current flows. Push in reverse and the depletion region widens: almost no current. That is a diode.

From junctions to transistors

A MOSFET has two n-type regions (source and drain) in p-type silicon. Normally the p–n junctions block current between them. A positive voltage on an insulated gate above the gap pulls electrons up into a thin channel that connects source to drain. No gate current flows: the gate's voltage alone opens the switch.

Common mix-ups

  • Holes are just empty space with no effect.
    ✓ A hole moves as neighbouring electrons fill it, so it carries current like a positive charge.
  • A diode conducts as soon as the voltage is positive.
    ✓ A silicon diode needs about 0.6–0.7 V before significant current flows.

Open the full lesson: Doped silicon and the p–n junction →

5.3 Building gates from switches

A modern chip has billions of transistors and almost all are wired as just three or four patterns. What are they?

Two kinds of switch

An nMOS conducts when its gate is high (1) and is good at pulling a node down to ground. A pMOS conducts when its gate is low (0) and is good at pulling up to VDD. In the switch-level model each is simply on or off; in reality each has some resistance and capacitance.

Pull-up and pull-down networks

A static CMOS gate has a pull-down network of nMOS between the output and ground and a pull-up network of pMOS between VDD and the output. Series nMOS = AND condition for pulling down; parallel nMOS = OR. The pull-up is the dual: series becomes parallel and vice versa. So NAND = series nMOS + parallel pMOS; NOR = parallel nMOS + series pMOS. Each input drives one of each: a 2-input gate has 4 transistors.

Why it costs so little to sit still

For every input combination exactly one network conducts. So in steady state there is no path from VDD to ground and only tiny leakage flows. Power is spent mainly when the output switches and its load capacitance charges or discharges, which is next lesson's topic.

Common mix-ups

  • CMOS gates draw current all the time, like a resistor.
    ✓ In steady state one network is always off, so only tiny leakage flows.
  • An AND gate is the simplest CMOS gate.
    ✓ NAND is simpler: AND is NAND plus an inverter (6 transistors).

Open the full lesson: Building gates from switches →

Worked examples

Conductors, insulators and why silicon: example 1

How many powers of ten separate the resistivity of copper (1.7 × 10⁻⁸ Ω·m) from glass (10¹² Ω·m)?

Solution

From 10⁻⁸ to 10¹² is 20 powers of ten (ignoring the 1.7). Glass resists about 10²⁰ times more strongly, about a hundred billion billion times.

Doped silicon and the p–n junction: example 1

A silicon diode and a 470 Ω resistor are in series with a 3.3 V supply. Estimate the current.

Solution

I ≈ (3.3 − 0.7)/470 ≈ 5.5 mA.

Building gates from switches: example 1

Design the transistor networks for a 3-input NOR.

Solution

Pull-down: three nMOS in parallel (any input 1 pulls Y low). Pull-up: three pMOS in series (all inputs 0 to connect Y to VDD). 6 transistors.

Interactive figures

Figure 5.2 from Conductors, insulators and why siliconStart with copper, then step through every material and watch the marker jump along the resistivity scale. Pick pure silicon and raise the temperature from 20 °C to 100 °C. Then compare pure silicon with doped silicon at the same size. Which change made the bigger difference?
Can't use the interactive? Read a description instead

The materials explorer places eight materials on a resistivity scale from 10⁻⁹ to 10¹⁴ ohm-metres: copper, aluminium and nichrome in the conductor region; germanium, pure silicon and doped silicon in the semiconductor region; glass and rubber in the insulator region. Heating copper from 20 °C to 70 °C raises its resistance about 20%; heating pure silicon over the same range cuts its resistance by more than ten times. Doped silicon conducts millions of times better than pure silicon.

Interactive figure (online). Description: The materials explorer places eight materials on a resistivity scale from 10⁻⁹ to 10¹⁴ ohm-metres: copper, aluminium and nichrome in the conductor region; germanium, pure silicon and doped silicon in the semiconductor region; glass and rubber in the insulator region. Heating copper from 20 °C to 70 °C raises its resistance about 20%; heating pure silicon over the same range cuts its resistance by more than ten times. Doped silicon conducts millions of times better than pure silicon.

Figure 5.3 from Building gates from switchesStart with the inverter and toggle A. Then switch to NAND and NOR and try all four input combinations. For each, say which network conducts and confirm there is never a path from VDD to ground.
Can't use the interactive? Read a description instead

In the gate builder, the inverter's output is 1 when A = 0 (pMOS on) and 0 when A = 1 (nMOS on). The NAND output is 0 only for A = B = 1, when both series nMOS conduct; the NOR output is 1 only for A = B = 0, when both series pMOS conduct. In every case exactly one network conducts.

Interactive figure (online). Description: In the gate builder, the inverter's output is 1 when A = 0 (pMOS on) and 0 when A = 1 (nMOS on). The NAND output is 0 only for A = B = 1, when both series nMOS conduct; the NOR output is 1 only for A = B = 0, when both series pMOS conduct. In every case exactly one network conducts.

Laboratory

Everything runs in your browser. No kit, nothing mains-powered. Simulations are simplified educational models.

Guided practice

Answers are checked on the server; wrong answers get a hint and another try. Signed in, solved items also count towards the source lesson.

Practice 1

Pure silicon at room temperature is best described as…

Practice 2

What does doping do to silicon?

Practice 3

Doping silicon with boron (3 outer electrons) makes…

Practice 4

A diode is reverse biased. What happens to the depletion region?

Practice 5

A pMOS transistor conducts when its gate is…

Practice 6

How many transistors are in a static CMOS 3-input NAND gate?

transistors

Practice 7

A student wires both networks of a gate so that, for input 11, both conduct. What happens?

  1. Pure silicon at room temperature is best described as…
    • A conductor
    • An insulator
    • A semiconductor
  2. What does doping do to silicon?
    • Adds a few impurity atoms that supply extra charge carriers, lowering resistivity hugely
    • Coats it in metal so it conducts
    • Heats it permanently
  3. Doping silicon with boron (3 outer electrons) makes…
    • n-type: extra electrons
    • p-type: holes that act as positive carriers
    • an insulator
    • a metal
  4. A diode is reverse biased. What happens to the depletion region?
    • It disappears
    • It widens, so almost no current flows
    • It becomes a conductor
    • It moves to the n side only
  5. A pMOS transistor conducts when its gate is…
    • 1 (high)
    • 0 (low)
    • floating
    • always
  6. How many transistors are in a static CMOS 3-input NAND gate? (transistors)
  7. A student wires both networks of a gate so that, for input 11, both conduct. What happens?
    • The output is a perfect 1
    • A direct path from VDD to ground: large current, undefined output
    • Nothing: CMOS can't draw current
    • The gate becomes a NOR

Engineering applications

  • Battery-powered devices

    Because a CMOS gate has no direct path from supply to ground once it has settled, a sleeping microcontroller can draw very little current. This is a large part of why a sensor node can run for a long time on a small battery.

  • Temperature sensing

    A semiconductor's resistance changes strongly with temperature. Thermistors use this on purpose; chip designers must allow for it, because hotter silicon conducts and leaks differently.

Watch

Optional verified videos. Nothing loads from YouTube until you press play.

Explains why silicon conducts so poorly on its own and how doping it changes everything.

Length: see YouTube · captions on YouTube · source

Nothing loads from YouTube until you press play.

Doping, junctions and why a small voltage on one terminal can switch a big current on and off, in six minutes.

6 min · captions on YouTube · source

Nothing loads from YouTube until you press play.

Builds real logic gates from transistors on a breadboard, linking abstract logic to actual electronics.

13 min 1 s · captions on YouTube · source

Nothing loads from YouTube until you press play.

  • How semiconductors work (Ben Eater)
  • How Does a Transistor Work? (Veritasium)
  • Making logic gates from transistors (Ben Eater)

Chapter summary

  • Semiconductors sit between conductors and insulators, and doping tunes how many free charge carriers they have.
  • A p–n junction conducts easily in one direction (forward bias) and very little in the other.
  • A MOSFET is a switch controlled by its gate voltage: nMOS conducts when the gate is high, pMOS when it is low.
  • A CMOS gate pairs a pMOS pull-up network with an nMOS pull-down network so exactly one of them conducts in steady state.

Glossary

Diode forward voltage
A diode conducts in one direction once the voltage across it reaches its forward voltage, after which its voltage stays roughly constant whatever the current.
NOT gate (inverter)
A NOT gate has one input and outputs its opposite: 0 becomes 1 and 1 becomes 0.
NAND and NOR (universal gates)
NAND outputs 0 only when all inputs are 1; NOR outputs 1 only when all inputs are 0. Either one alone can build every other logic function.
Electrical power
The power transferred in a component is the voltage across it multiplied by the current through it. For a resistor this can also be written I²R or V²/R.

Definitions from the Field Guide.

Project: Transistor count for a NOR gate

Design a two-input CMOS NOR gate. Draw the pull-up and pull-down networks, explain why one is series and the other parallel, and check all four input cases to show the output is never connected to both supply and ground.

Deliverables

  • A transistor-level sketch
  • A four-row table of which transistors conduct
  • A sentence on why the design draws almost no static current

Keep your work in your Engineering Journal; it stays private unless you choose to share it.

References

  • Neil H. E. Weste and David Money Harris (2011). CMOS VLSI Design: A Circuits and Systems Perspective, 4th edition. Addison-Wesley.
  • Robert H. Dennard et al. (1974). "Design of Ion-Implanted MOSFET's with Very Small Physical Dimensions". IEEE Journal of Solid-State Circuits 9(5), 256–268. doi:10.1109/JSSC.1974.1050511 Link ↗
  • Gordon E. Moore (1965). "Cramming More Components onto Integrated Circuits". Electronics 38(8), 114–117.

Publication record

Version
1
Status
Technically checked (automated checks only)
Technical review
Automated checks only, last run 2026-11-29. No human, educator or mentor review is claimed.src/content/textbooks/textbooks.test.ts: schema, every lesson, diagram, practice item, video, Field Guide entry, lab and reference resolves; figure numbers recomputed; no practice answers in client payloads.
Written by
Compiled and written by the Tactiverge team with AI assistance, from Tactiverge School lessons that were themselves written with AI assistance.
Licence
All rights reserved by the founders unless a licence is approved.
Corrections
None recorded yet.Spotted a mistake? Use “Report a problem” on any chapter, or see the corrections page.