What Is a Transistor? How a Transistor Works as a Switch

13 min read · Updated: October 23, 2026

A transistor is a tiny switch that turns a flow of electricity on and off, using another electrical signal. A high-end smartphone chip contains more than 10 billion of them. The chip treats on and off as "1" and "0," and computes by combining them.

What you'll learn

  • The two jobs of a transistor (switching and amplifying)
  • How the transistor used in chips (the MOSFET) makes a path for electrons with the gate voltage
  • Why CMOS, which pairs nMOS and pMOS, saves power
  • How switches lead to computing with 0 and 1, and the history of the transistor

Prerequisites: none. Reading "What Is a Semiconductor?" first makes the parts about n-type and p-type easier to follow.

In everyday life: 19 billion in a phone chip

At the center of a smartphone is a chip that handles computing and image processing together. One example is the A17 Pro, the chip Apple announced in 2023 for the iPhone 15 Pro. At its launch event, Apple said the chip holds about 19 billion transistors. That is more than twice the world's population in 2023 (about 8 billion).

An electronic circuit like this, with many parts combined on one small slab, is called an integrated circuit (IC). ICs are found not only in phones and computers but also in TVs, cars and rice cookers. In ICs that compute, most of the parts doing the work are transistors.

So what does a transistor do? In a word, it is a switch operated by electricity.

A transistor is a switch flipped by electricity

A light switch on the wall turns the flow of electricity on and off when you press it with a finger. A transistor also turns a flow on and off, but another electrical signal flips it instead of a finger. It has no moving parts. So it can be made very small, and it switches far faster than any hand could.

A transistor has a second job. It can make a large current stronger or weaker, following the changes in a small incoming signal. This is called amplification. It is used to boost weak signals in radios, audio equipment and microphones.

Circuits that compute with 0s and 1s, like a phone chip, mainly use the switching job. From here on, this article focuses on the transistor as a switch.

The transistor inside chips: the MOSFET

There are several kinds of transistors. Almost all the transistors in today's chips are one kind, called the MOSFET ("moss-fet"). We will explain the name after looking at how it works.

A MOSFET has three important parts. Their names describe their roles.

  • Source: the side the flowing electrons come from
  • Drain: the side the electrons leave through, like water down a drain
  • Gate: sits above the space between source and drain. The voltage on it decides whether the switch is on or off
Cross-section of a MOSFET: the gate voltage creates a path for electrons No gate voltage → off Gate Insulator Source n-type Drain n-type × No path for electrons No current flows p-type + voltage on gate → on Gate + Source Drain Path for electrons (channel) Electrons flow source → drain p-type
A simplified picture of an nMOS (explained later), cut vertically. Top: no voltage on the gate. Bottom: a positive voltage on the gate. What this figure leaves out: the wiring, the voltage applied between source and drain, and true proportions. Transistors in the newest chips are not flat like this but three-dimensional.

The figure shows a very simplified cross-section of a MOSFET. The source and drain are made a short distance apart. The gate sits above the space between them, on a very thin insulating film (a film that does not conduct). In other words, the gate does not touch the semiconductor below it.

The gate voltage creates a path for electrons

Let's recall a little from the previous article, "What Is a Semiconductor?" A semiconductor can be made into two types, depending on what is mixed into it. The n-type has many electrons that can move freely. The p-type has many holes, the empty spots where electrons are missing. A hole behaves like a particle with positive charge.

In the MOSFET in the figure, the source and drain are n-type. The region between and below them is p-type. With no voltage on the gate, the p-type region acts as a "wall." Electrons from the source cannot get through to the drain, so no current flows. This is the off state.

The real reason for the wall lies at the boundaries between n-type and p-type. Going from source to drain, the regions run n-type, p-type, n-type. For now, just think of it this way: there are two boundaries, so current has trouble flowing in either direction.

Next, apply a positive voltage to the gate. Electrons are pulled toward the positive gate and gather just under the insulating film. Holes, which act like positive particles, are pushed away. As the voltage rises, the gathered electrons form a thin layer that connects the source and drain.

This layer of electrons is the path for current. It is called the channel, like a channel that carries water. Once the channel forms, electrons flow from source to drain, and the switch is on. Lower the gate voltage, and the channel disappears. The switch is off again.

The gate voltage at the border between off and on is called the threshold voltage. The insulating film separates the gate, so almost no current flows into it. Just by applying a voltage, the gate can create or remove a path for electrons beneath it. This is the MOSFET's big strength.

The name MOSFET comes from this structure. MOS describes the stack: a Metal gate, an Oxide insulating film and a Semiconductor base. Today the gate and film are made of other materials, but the name has stayed. FET stands for "field-effect transistor." It means the current is controlled by the electric force (the electric field) that a voltage creates.

This explanation is heavily simplified to make it easy to follow. For example, for electrons to actually flow, a voltage is also needed between the source and drain. Also, by convention, current is counted as flowing in the opposite direction to the electrons.

nMOS and pMOS: two opposite kinds

So far, we have described a MOSFET whose source and drain are n-type and whose path is made of electrons. It is called an nMOS (n-channel MOSFET). An nMOS turns on when the gate voltage is high and off when it is low.

There is also a MOSFET with n-type and p-type swapped, called a pMOS. In a pMOS, holes form the path and carry the current. It also behaves the opposite way. In normal use, it turns on when the gate voltage is low and off when it is high. The table in "nMOS vs. pMOS" compares the two.

Combining the two saves power: CMOS

The figure below shows the simplest circuit made from one nMOS and one pMOS. The pMOS on top connects to the positive side of the power supply. The nMOS below connects to the 0 V side. The same input signal goes to both gates.

A CMOS circuit combining an nMOS and a pMOS (NOT gate) Power supply + pMOS Output nMOS 0 V Input Input 0: pMOS on → output is 1 Input 1: nMOS on → output is 0
The simplest CMOS circuit, with one nMOS and one pMOS. Whether the input is 0 or 1, one of the two is always off. What this figure leaves out: the real circuit symbols, how the parts are laid out on a chip, and what happens while they switch.

When the input voltage is high, the lower nMOS turns on and the upper pMOS turns off. The output connects to the 0 V side through the nMOS, so its voltage is low. When the input is low, the reverse happens. The output connects to the positive side of the supply, so its voltage is high.

A circuit style in which nMOS and pMOS work together like this is called CMOS ("see-moss"). The C stands for complementary, meaning "completing each other."

The strength of CMOS is that, in either state, one of the two transistors is always off. So there is never a straight path for current from the positive supply to 0 V. While the circuit holds its output, it uses almost no power. It uses power mainly when it switches between on and off.

CMOS was introduced in 1963, and today almost all chips are built this way. It is one of the main reasons billions of transistors can run on a battery. "Static vs. dynamic power" explains in more detail how power is used.

From switches to 0 and 1, and on to computing

Computers represent information by matching high and low voltages to "1" and "0." Let's look at the CMOS circuit again in terms of 0 and 1. When the input is 1, the output is 0. When the input is 0, the output is 1.

So this circuit flips 0 and 1. In the world of circuits that handle 0 and 1 (logic circuits), it is called a NOT gate, or inverter. Here, "gate" means one unit of circuit that processes 0s and 1s. It is not the same as a MOSFET's gate. A table that lists each input with its output is called a truth table.

InputOutput
01
10

Change the number of transistors and how they connect, and you can build other gates. One is the AND gate, which outputs 1 only when both inputs are 1. Combine gates, and you can add numbers. Combine even more, and you can do complex calculations. A CPU, the part of a chip in charge of computing, is such circuitry built from a huge number of transistors. "What Is a CPU?" explains what a CPU does.

If you want to try it yourself, use the logic circuit simulator. Place NOT and AND gates and flip the input switches. You can see right away how the output changes.

History: from the 1947 invention

The first transistor was born in December 1947 at Bell Labs in the US. John Bardeen and Walter Brattain pressed two gold contacts, very close together, onto a crystal of germanium, a semiconductor. With this device, they succeeded in amplifying a signal. Because of its shape, it is called the point-contact transistor.

Their research group was led by William Shockley. The point-contact type was hard to make, and in 1948 he set out to fix this weakness. The result was his idea for the junction transistor. The three received the Nobel Prize in Physics in 1956. Transistors descended from this line are called bipolar transistors. They are still used today, for example in circuits that handle smooth, continuous signals such as sound, or large amounts of power.

YearEvent
1947At Bell Labs, Bardeen and Brattain achieve amplification with the point-contact transistor
1958Jack Kilby of Texas Instruments runs the first integrated circuit: parts made on one piece of semiconductor, joined by thin gold wires
1959Robert Noyce of Fairchild conceives an integrated circuit built on a flat silicon surface, wiring included, and files a patent. It becomes the basis for mass production
1959–60Mohamed Atalla and Dawon Kahng of Bell Labs build a working MOSFET
1963Frank Wanlass and C. T. Sah of Fairchild introduce CMOS
1971Intel announces the 4004, the first commercial microprocessor, with the core of a computer on one chip (about 2,300 transistors)

With the integrated circuit, transistors no longer had to be made one at a time and connected with wires. Many transistors could now be made together, all at once. Kilby received the Nobel Prize in Physics in 2000 for his part in inventing the integrated circuit.

Smaller and more numerous: Moore's law

In 1965, Gordon Moore, who later co-founded Intel, pointed out that the number of parts on a chip was roughly doubling every year. In 1975, he revised the pace to "doubling about every two years." This forecast later came to be called Moore's law.

Despite the name "law," it is not a law of nature. It is an observation of a past trend, and a forecast based on it. One reason it held for so long is that the industry used this pace as a target when developing equipment and materials.

Smaller transistors mean more of them fit on a chip of the same size. For a long time, smaller transistors also switched faster and used less power per switch. More transistors, faster and more power-efficient: this is a big reason computers became cheaper and more powerful.

From around the mid-2000s, however, shrinking alone no longer cut power easily, and manufacturing costs rose sharply. Today, performance keeps growing through a mix of methods, such as three-dimensional transistors and stacked chips. "Beyond Scaling" gives an overview of these methods.

Common misconceptions

Myth: A "3 nm chip" has transistors that are 3 nm in size

In fact, the number is a name that tells chip generations apart. Long ago, the number roughly matched a real size, such as the length of the gate. That is how the myth arose. According to IEEE Spectrum (2020), the magazine of the engineering society IEEE, this mismatch has lasted for about 20 years. Even in the "7 nm" generation, the key dimensions are much larger than 7 nm.

Myth: Moore's law is a law of physics, so counts always double every two years

In fact, it is an observation and a forecast that Moore drew from past trends. Moore himself changed the pace, from "doubling every year" in 1965 to "doubling about every two years" in 1975. The often-quoted "doubling every 18 months" is not a figure Moore gave (according to the Computer History Museum).

Myth: CMOS uses no power at all

In fact, it uses power every time it switches between on and off. A tiny current also leaks through transistors that are off. This leakage tends to grow as transistors shrink, so today's chips need ways to deal with it. It is more accurate to say: "CMOS uses very little power while it is doing nothing."

By the numbers

  • About 8 million times: The Intel 4004 of 1971 had about 2,300 transistors. The A17 Pro of 2023 has about 19 billion. In about 50 years, the count grew roughly 8 million times. That means it doubled about every 2 years and 3 months, close to the "about two years" Moore gave in 1975 (our own calculation).
  • About 69 billion: A phone's working memory (DRAM) stores each bit (one 0 or 1) with one transistor and one part that stores electric charge. 8 GB is about 69 billion bits. So the storage part alone has about 69 billion transistors (our rough calculation, not counting the surrounding circuits).
  • About 1.3×1022: The estimated number of transistors made from 1947 to around 2018. Industry analyst Jim Handy made this estimate, and the Computer History Museum presented it in 2018. That is 13 billion times 1 trillion. The transistor is described as the object humans have made in the greatest numbers.

Learn more

  • See it in figures: the CMOS circuit also appears in the figure "CMOS inverter." A more technical figure, "nMOS channel," shows the channel. The channel is a layer of electrons gathered in a p-type region, so its technical name is the inversion layer.
  • The other transistor: "BJT vs. MOSFET" compares the MOSFET with the bipolar transistor, which descends from the 1947 invention.
  • Three-dimensional transistors: "Planar MOSFET vs. FinFET" explains why transistors went from flat to three-dimensional.
  • Ready for the next level: the MOSFET I-V curve calculator lets you try out, with numbers, how the gate voltage relates to the current that flows.

Read next

Articles in the series “Semiconductors for beginners”

  1. How to Start Learning Semiconductors: Beginner Reading Order
  2. What Is a Semiconductor? How Conductivity Can Be Controlled
  3. What Is a Transistor? How a Transistor Works as a Switch
  4. What Is an Integrated Circuit? IC vs Chip vs Die vs SoC
  5. What Does 2nm or 3nm Mean? Chip Process Nodes Explained
  6. What Is a Diode? How It Lets Current Flow Only One Way
  7. What Is CMOS? How nMOS and pMOS Pairs Save Power
  8. What Is a GAA Transistor? Gate-All-Around Nanosheets

Questions on this topic: MOSFET

Sources

All explainers