Everything a computer does — every photo, every game, every calculation — comes down to one absurdly simple part flipping on and off, billions of times a second. Let's meet it.
Start with something familiar: a light switch. Flip it one way, no electricity flows and the bulb stays dark. Flip it the other way, electricity flows and the bulb lights up. That's it — a switch has exactly two states. Try it:
Click the switch. Off = 0, no current. On = 1, current flows and the bulb lights.
Simple as it is, that's the entire vocabulary a computer has to work with: off and on. No computer part actually "understands" numbers, letters, or pictures — it only ever deals with whether a wire has electricity on it or not. The magic is in how many of these switches get wired together, and how fast they can flip.
A light switch needs a finger to flip it. But what if a wire could flip a switch, instead of a finger? Then one part of a circuit could automatically control another part — no human required. That's exactly what a transistor is: a switch that gets flipped by voltage on a separate wire, rather than by hand.
A modern transistor is smaller than a virus. A single chip in a phone or laptop holds billions of them. But every one of them works on the same basic idea shown below.
Power is always available on the left. Click to toggle the control wire — it decides whether power reaches "out."
Notice what just happened: you didn't touch the switch itself — you only changed the voltage on the control wire, and that decided whether current could get from "power" to "out." A transistor is a switch that another signal flips. That one idea, repeated and combined billions of times, is the entire basis of every computer ever built.
Why this matters: if one wire's on/off state can control whether another wire turns on or off, you can start wiring transistors together so that combinations of on/off inputs produce a specific on/off output. That's exactly what a logic gate is — up next.