You’ve got a brain, right? Sure you do! And so does your computer. But instead of a soft, squishy blob of neurons and axons and synapses, your computer has a small square chip about the size of a Triscuit cracker that does it’s thinking. As much as I wish all computers and robotics were powered like Krang from the Teenage Mutant Ninja Turtles, with a human-style evil brain creature inside operating the controls, this is not the case. Instead, a CPU (or microprocessor) is the computer’s puppet master responsible for ensuring everything runs smoothly.
So how does one tiny little chip control every aspect of your computer’s operation? How does it know what to do, and how does it process the data that goes through it? Well, I’m here to tell you, as simply stated as possible.
Slap on your highway boots, Daddy Bojangles, it’s time for some high-tech information made easy.
CPU stands for central processing unit. The name is pretty telling and lets you know that this piece of equipment serves the most crucial role in your computer’s operation. Every component in your computer is connected to the motherboard, but the motherboard wouldn’t know how to communicate with all the pieces without the CPU. All roads lead to Rome, and Rome happens to be a little square computer chip.
The first microprocessor was built in 1971, which is way before the general public knew anything about computers. People were still using rotary phones, watching The Flip Wilson Show and jamming out to Rod Stewart’s new single “Maggie May,” totally unaware that something was being invented that would completely restructure life twenty years down the road.
A microprocessor generally handles a few major tasks. Fundamentally, a CPU executes a program using a few parts. Its Arithmetic/Logic Unit (ALU) performs mathematical operations. You know, like adding and subtracting, multiplication – all that stuff you hate doing. Except it can do it on a huge scale, with numbers a mile long. It can also move data from one place to another, and make decisions using its Control Unit (CU).
The basic element of a microprocessor is a transistor. Field Effect Transistors (FETs), which are the type of transistors that make up these bad boys, work like light switches. They are on or off; electricity is either flowing through them, or it isn’t. Hopefully you’re familiar with light switch operations, otherwise you ought to just stop right now.
Then, there are logic gates. It sounds like something you could walk through and suddenly become more intelligent, but it’s actually the result of connecting all those little transistors together. There are gates called AND gates, and gates called OR gates. AND gates have one two inputs and one output. OR gates have different results. Think of it like the English language – if you have one of something AND two of that same something, then you have three. If you have one OR two, you can have, well, one or two. It doesn’t need to make perfect sense in the CPU’s context, just comprehend it on a basic level for me, will ya?
There are other types of logic gates, too, but we won’t get into that. The point is that connecting transistors makes logic gates that can utilize electronic binary information to make decisions.
Any time you use your computer, you are running a bunch of programs to do what you need to do. The CPU fetches instructions from the program, which is represented by binary information. Binary information is an insanely large number of 0s and 1s that form together to tell the CPU what it is supposed to do. Everything that goes on within your computer is binary. The processor decodes this 0 and 1 data and breaks it up. To keep it simple, it assigns different bits of data to different parts of the CPU for processing. The CPU contains libraries of instructions, which are more or less a list of things you can ask it to do. It takes input from programs and uses these libraries of instructions to turn that input into output.
Information comes in, information goes out.
To explain it in different language, the CPU itself can store very little bits of information. When you do something in a program, it’s the program’s job to transform your request into computer language. Say, for example, you click the mouse somewhere. The knowledge of what that mouse click is supposed to do is translated to computer language which then is passed to the CPU. In the CPU it is sent to the correct part of the CPU that makes the decision regarding said mouse click. The command is processed and sent back from the CPU to the program, re-translated from computer language to the program’s language, and the appropriate result of your mouse click is shown on the screen. Obviously this happens in a split second, over and over again. In the time it took you to read that paragraph, your CPU handled tens of thousands of requests.
All the while, the CPU is communicating with your computer’s RAM, which is the place where it houses active program information. The CPU can only store information while it’s deciding what to do with it. Once it’s passed back to the program, it’s RAM’s turn. RAM remembers what you’re doing while you’re doing it, but erases itself when it loses power – which is why your data gets lost during a power failure. For more on RAM, check out our “How Stuff Works: RAM” article from a few weeks ago.
The last few paragraphs have been sort of technical, but there’s really no way around that. However, it may help if we have a little metaphor to put the processor’s actions into a different context. Everyone loves a good metaphor.
Every component in the computer, including the video card, CD drive, etc. have an “address.” Say that mouse click we mentioned earlier was intended to open a file on the hard drive. The information being sent to the processor is something like “bring me the file located at 322 Green St. on the first hard drive, which is sitting at 201 Fatty Cheeseburger Ct..” The file has a certain place on the drive, the drive has a certain place within the system, and the address is how the CPU finds it and sends it back to the program.
Considering the amount of operations your CPU is doing at any given time, you can imagine the number of logic gates require to process everything you’re doing. If you can’t imagine, then I’ll tell you – hundreds of millions. That’s how many processors live on that single, tiny, one square inch chip within your computer, laptop, whatever.
On a basic level, that pretty much sums up how a CPU handles your information.
Time for a quick sum-up for those who don’t like to read:
Get instructional information from a program in binary form.
Interpret the instructions, send commands to the proper place on the CPU to handle the request.
Perform arithmetic or logical operations needed.
Connect with other computer components for assistance in processing the request.
Send the result back to the program.
Got it? Maybe. The processor is an extremely complicated little piece of technology. It’s almost impossible for our giant brains to fully comprehend how this tiny computer brain can house so much stuff and perform so many operations millions of times over ever second. But as long as you understand the basics, you should have a better grasp on just what that little chip is busy doing all day long.
And remember, even though your CPU may be infinitely smarter than you at math and logistical processing, and may make you feel as though your brain is an inferior piece of hardware, if you ask a CPU to give you a hug, it will never provide.