What is CMOS, and why do chip switches come in pairs?
CMOS is the way almost every digital chip today builds its circuits: it pairs two kinds of switch that work in opposite ways, one to connect the output to the power supply and one to connect it to ground. The name is short for complementary metal-oxide-semiconductor, and the two kinds of switch are called NMOS and PMOS. Paired like this, almost no current flows from the supply to ground while the switches aren't switching, so the chip uses very little power.
Search for "CMOS" and you'll also find two other meanings, both borrowed from this one. The "CMOS sensor" in a camera or phone is a light-sensing chip made with the same CMOS methods. The "CMOS settings" on a computer's motherboard got their name because early computers kept the date and their startup settings in a small memory chip built with CMOS; it used so little power that a button battery could keep it going for years. This article is about the first meaning: the circuits inside chips.
What does the name CMOS mean, letter by letter?
Start with MOS. These three letters name the three layers of a transistor, from top to bottom:
- Metal: the gate on top, which controls the switch. It was originally made of metal.
- Oxide: a very thin insulating layer under the gate, which doesn't conduct electricity. It was originally a layer of silicon oxide, grown by oxidizing the silicon surface in a furnace.
- Semiconductor: the silicon at the bottom, where the current flows.
The materials changed several times after that. For a long stretch the gate was made of a conducting form of silicon instead, and from around the late 2000s the most advanced chips went back to metal; the insulating layer changed materials too. The name never changed. For how these three layers make a switch, see What is a transistor?.
The C at the front stands for complementary: there are two kinds of switch, they work in opposite ways, and together each makes up for what the other can't do.
How are the two kinds of switch different?
- NMOS (the n-type kind): it turns on only when its gate has a voltage, and stays off without one.
- PMOS (the p-type kind): the reverse. One end of it is tied to the supply side, and it turns on only when its gate is lower than that end: with no voltage on the gate (0 volts) it's on, and a gate voltage as high as the supply turns it off.
The n and p in the names refer to the switch's entrance and exit (the source and the drain): whether they are n-type or p-type silicon. N-type and p-type are made by adding different atoms to silicon; see What is doping?.
The simplest CMOS circuit: how does an inverter work?
An inverter does just one thing: put in a 1 and you get a 0; put in a 0 and you get a 1. It needs only two switches:
- A PMOS on top, between the output and the power supply.
- An NMOS below, between the output and ground. Ground is the side with the lowest voltage (0 volts).
- The gates of the two switches are joined, and that is the input.
Think of the output wire as a small pool. One pipe leads up to a water tower (the power supply), the other down to a drain (ground). The valve on the upper pipe is the PMOS, and the valve on the lower pipe is the NMOS. Whichever pipe is open, the pool's water level matches that side: a high level is a 1, a low level is a 0.
| Input | PMOS on top (to the supply) | NMOS below (to ground) | Output |
|---|---|---|---|
| 1 (high voltage) | off | on | connected to ground: 0 |
| 0 (low voltage) | on | off | connected to the supply: 1 |
When the input is 1, there's a voltage on the gates: the NMOS turns on, the PMOS turns off, and the output is connected to ground, so it's 0. When the input is 0, it's the other way round: the PMOS turns on, the NMOS turns off, and the output is connected to the supply, so it's 1.
So what are the 0s and 1s in a chip, really?
They are high and low voltages on a wire: connected to the supply, the voltage is high, and that's a 1; connected to ground, the voltage is low, and that's a 0. A switch being on doesn't make a 1.
Look at the table again: when the input is 1, the lower switch is on, and yet the output is 0. Whether a switch is on or off decides which side the wire is connected to. In CMOS, once things settle, every output wire is connected either to the supply or to ground, so its voltage is clearly high or clearly low. That wire then goes to the gates of the next pair of switches and becomes their input.
That is how logic circuits such as processors work. Memory can be different: reading one cell of flash memory really does come down to whether that one switch opens easily (see "How is memory different from a processor?").
Why pair two kinds of switch?
To save power.
With only one kind of switch, the other end needs something like a resistor that is always partly open, pulling the output toward the supply. It's as if the pipe from the water tower were never fully shut: open the lower valve and water runs straight from the tower into the drain, and it keeps running for as long as the output stays at 0. Many of the chips built for computers in the 1970s worked this way: faster, but hungrier for power.
CMOS is different. When nothing is switching, one of the two switches is always off, so there is no open path from the supply to ground and almost no current flows. The power goes mainly into the moment of switching: when the level goes from low to high, the pool has to be filled; from high to low, it's emptied again. The pool is the wire plus the gates of the next pair of switches. For an instant during the switch, both switches are also partly on at the same time, and a little current flows through.
What's left is the current that leaks through switches that don't shut tightly, called leakage. One switch leaks very little, but a chip holds a huge number of them, and together they make the standby current; see Why do chips use power?.
Because it saves power, CMOS was first used in the 1970s in things that run on small batteries, such as digital watches and calculators. In the 1980s it became the main way to make digital chips, and to this day almost every digital chip uses it.
Are other logic gates paired the same way?
Yes. The inverter is the simplest; connect the two kinds of switch in series and in parallel, and you can build the other logic gates. In series, every switch has to be on for current to get through; in parallel, any one is enough. The CMOS rule: when the switches on the ground side are in series, the ones on the supply side are in parallel, and the other way round. That way, whatever the inputs, once things settle only one side is connected, so the gate saves power just the same. For how logic gates add up to a chip that computes, see What are logic gates?.
How are both kinds of switch made on one wafer?
An NMOS has to sit on p-type silicon, and a PMOS on n-type silicon: the entrance and exit must be the opposite type from the silicon beneath them, so that the switch stays off until the gate acts. So early on, the wafer gets two kinds of "floor," p-type and n-type, called wells. Photoresist covers one side while one kind of atom is shot in; then a new layer of photoresist, and the other kind (for how, see What is ion implantation?). Later, the entrances and exits of the two kinds of switch are also implanted separately. For how a transistor is made from start to finish, see How is a transistor made?.
In fab24hr
fab24hr's main story, The life of a chip, follows Glowmere, a fictional hearing-aid chip. The two kinds of switch show up in several places:
- Chapter 1, "How to Split 12": you're the R&D integration engineer, deciding which corner each of the 12 wafers is made at. On the split plan, SF means the N-type is slow and the P-type fast, and FS is the reverse: one kind of switch fast, the other slow, out of step with each other.
- Chapter 2, "Station by Station": on Day 5 at the implanter, the N-wells go in first; then a new layer of photoresist, and the P-wells.
- Chapter 10, "Standby Current": you're the test engineer at the test-and-assembly house. The most common failure in the bins is standby current too high. Whether to tighten the limit or loosen it is up to you, and then it goes into the test program. A CMOS chip at rest uses almost no power, so what's left is leakage, and the customer says it's the most important number for Glowmere.
A day in the fab has it too: tap "Clock in", choose "A day in the fab", then on the "Your role today" card tap "R&D line", swipe to the R&D process engineer and tap "Implant" under the name. On the late-night shift you implant the atoms for both ends of the N-type transistors; on the afternoon shift, it's the P-type run.
The companies, chips, people and figures in the game are fictional; how CMOS works and why it saves power follow public, general sources. For other jargon, see Chip fab jargon in plain English.
Where you'll meet it in the gameIn the main story, The life of a chip, the split plan in chapter 1 has SF and FS, where the N-type and P-type transistors come out one fast and one slow; in chapter 10, Standby Current, you decide how much of the leakage left in an idle chip is too much.
In fab24hr, a CMOS chip at rest is left with little but leakage, and that bit of standby current is the most important number for Glowmere, a hearing-aid chip.
Start at chapter 10, Standby CurrentTeachers: this article can go with "fab24hr in the classroom" in class.
Cite this article"What is CMOS, and why do chip switches come in pairs?" fab24hr, updated . https://fab24hr.com/en/blog/what-is-cmos/
Free to use in class and for non-commercial teaching: on screen, in handouts, printed for students. Please credit fab24hr. Do not sell it or present it as your own work. Spot a mistake? Report it
More articles
What are logic gates, and how do switches become a chip that computes?
What does each part of the semiconductor supply chain do?
What is semiconductor IP, and why do chips contain circuits someone else designed?
What is EDA, and what does chip design software do at each step?
- What is fab24hr?: the two ways to play, the four shifts, common questions, sources
- The life of a chip: the life of one chip: tape-out, pilot run, mass production, wafer test, packaging, shipping
- A day in the life of a fab engineer: who does what (PE, EE, PIE, manufacturing), and the day hour by hour
- Who works in a chip fab: technicians, Manufacturing, process, equipment, Facilities, integration, QA, production control, masks, R&D, the chief, the vendor, and test and assembly at the test-and-assembly house: each role's day
- Chip fab jargon in plain English: MO, Hold, Q-time, OCAP and the rest, one plain sentence each
- Semiconductors 101: a free course following the life of a chip: A beginner's semiconductor course that follows the life of a chip: illustrated notes, slides, readings, 3D machines and discussion questions, for self-study or a class
- Chip fab machines, taken apart: What 31 chip fab machines do (etch, scanner, CMP, furnace, packaging…), each as a 3D model to take apart
- fab24hr in the classroom: Semiconductor lesson plans: 20/40-minute plans, a lesson per chapter or process area (3D machines, the game, articles), discussion questions, a worksheet, FAQ
- About and press kit: trailer, gameplay clips, descriptions and key facts