Eli5: what is inside a cpu, and how does it perform thousands of calculations a second?

1.45K views

Eli5: what is inside a cpu, and how does it perform thousands of calculations a second?

In: Technology

10 Answers

Anonymous 0 Comments

Electricity can be tough to ELI5.

Sometimes it’s easier to think of water flowing through pipes. Imagine a water pipe hanging horizontally, like on a wall or from the ceiling. This pipe has dozens of pipes sticking out the bottom of it, which can be opened or closed by valves. These flow down into other pipes, and they can crisscross and flow into little pools or tanks, or larger pipes or smaller pipes, all the way down to the floor. It looks like a mess, right? But you know that water flows from the top pipe into the other pipes, and by turning certain valves, you can get the water to flow to different places. That much should make sense, even if you can’t follow the flow through the entangled mess.

If you open/close certain combinations of values, water can fill certain tanks or pools along the way. Some of these could be attached to a water wheel or some other object that reacts to water flowing. This is how electric circuits work: electrons “flow” through conductive wire, like copper, and certain special materials can sense and control this flow, maybe able to turn on a light.

In a CPU, this is happening billions of times over minutes or seconds with tiny “electrical valves” called transistors. You don’t need to understand how a transistor works, but it’s like a water valve, like a faucet at your sink, for electricity. On a computer chip, you have power from the wall, which comes from a power plant. This is the top pipe in the water pipe picture above. Without the “power,” the CPU has no electricity to calculate with or measure. Computer software performs calculations. It translates instructions from code or from your interactions with the computer into very basic building blocks. Essentially, it turns language into a series of “yes” or “no” questions for the computer. To ask the CPU these “yes” or “no” questions, it turns a series of these valves open or closed, and “water” (electricity) begins to flow. Once it flows, the “water” flowing through those “pipes” will have flowed to a particular pipe or a particular tank, and the computer software reads it, then translates it back to your monitor so you know what happened. Of course to create the level of complexity we see with a full modern computer this machinery would have to be extraordinarily complex, and it is. You need billions of these “water pipes and valves” to represent the information you expect the computer to do, like addition and subtraction, and displaying letters and numbers and colors on the monitor. It has to do all of that by electricity flowing through little circuits and measuring where that electricity goes, and sometimes how much of it goes there.

You are viewing 1 out of 10 answers, click here to view all answers.