I’m going to try to explain something crucial to computers that I’m sure many people have heard of: the mighty transistor. What are transistors? How do they work? What makes them so useful in computers?

First, what a transistor is…actually, that’s very easy. At the end of the day, a transistor is basically a switch. It can turn things on and off. The only difference between a transistor and a light switch is that to turn a light switch on or off, you use your hand. A transistor is turned on or off by the presence (or lack of presence) of an electrical signal. That really is all they do. By itself, switching something on and off isn’t that useful but when you start combining multiple switches together, or using different kinds that switch on and off gradually, cool things start to be possible.

A good way to explain a common transistor application is with a record player. On the record player, there’s a tiny stylus that vibrates based on the bumps in the record grooves. As it vibrates, a magnet attached to the stylus vibrates near tiny wire coils. This creates an electrical charge, or signal which represents the music, but this charge is extremely weak, on the order of a few millivolts. A few millivolts is not enough to power speakers or headphones, so we have to amplify that signal. We do that using transistors. That tiny millivolt signal is used as the electrical signal that turns our transistor on or off (in this case, on to off is a range of values). So what are we switching on/off in this case? A much larger power source such as wall outlet power. That’s more than enough to power the speakers. The wall-level power is controlled and will be directly proportional to the tiny signal from the stylus. The transistor can change the output level thousands of times per second without a problem. Try doing that with a light switch.

You may have heard things about how many transistors are on a chip or CPU die.) These are the same transistors I just talked about. They’re just switches. The A7 chip in the new iPhone for example contains over 1 billion of them. In computers, they’re basically used to compare binary (on or off) signals. This allows you to create AND gates, OR gates, multiplexors, adders, flip-flops and more. Those pieces go on to form things like RAM, registers, arithmetic logic units, controllers and much more. Transistors are perfectly suited for computers because they can be made extremely small, they consume almost no power, and they’re extremely reliable because they are solid state.

The modern-day silicon-based transistor wasn’t born until the mid 1950s, but there were obviously computers before that, so what’s the deal? Things like the Colossus (what a great name) and the famous ENIAC were built in the 1940s and used vacuum tubes and mechanical relays as switches. These early computers worked on the exact same principles as modern computers. They had many of the same things like memory, arithmetic logic units, registers, etc. The problem with vacuum tubes and relays was that they were prone to failure and consumed an enormous amount of power. The single ENIAC alone had over 17,000 vacuum tubes and consumed around 150 kilowatts of power.

It’s amazing to think that such a simple microscopic component is capable of doing so much. The entire modern world is utterly dependent on them, and the rate at which computational power has increased thanks to better and smaller transistors is mind boggling. The ENIAC could perform up to thousands of operations per second (depending on complexity) and it used a 100kHz clock. It’s almost inconceivable that 60 years later CPUs with clock speeds in the billions of cycles per second are so commonplace (and cheap) we hardly even think about it. I can get an Intel Core-i7 with 4 independent computing cores and a clock speed of 3.9GHz for just over $300. The ENIAC cost millions of dollars to build.

So whether your using a Cray supercomputer to run global climate model simulations, or watching cat videos on your iPhone, don’t forget the mighty little transistor that makes it all possible.