- slide 1 of 7
Introduction to CPUs
A common analogy is comparing the CPU to the brain of the computer. Seeing that CPU stands for “Central Processing Unit”, this makes a good deal of sense, as this is what does the “thinking” for the computer.
The function of the CPU follows three basic steps:
- Accepts input,
- Processes data,
- Creates output.
Accepting input is comparable to our brain's receiving of external sensory information, just as creating output is comparable to the commands that our brain gives the body. The processing is guided by programs, which converts input into output. The output produced includes commands to the video card, sound card, printer, memory, etc.
The CPU is typically located on the motherboard. The CPU is also referred to as the microprocessor or the computer processor.
- slide 3 of 7
Control Unit and the ALU
Consider first the Control Unit. This is the real center of it all, the part the directs and redirects signals to execute different programs and procedures, though it does not do the actual execution. This is the the management of the CPU, directing data flow into and out of the CPU, as well as within the CPU.
The Control Unit directs the actual processing to be done to the ALU, or Arithmetic Logic Unit. This performs single logical binary operations that, when taken together on the scale of hundreds or thousands, perform the incredibly complex procedures that we trigger with every click of a mouse. Everything you do on a computer is turned into a numeric operation, and it's the ALU that calculates it.
- slide 5 of 7
Registers and Caches
In addition, there are several components that directly aid these primary two:
The Registers work for the ALU as a temporary storage location for data during processing. They use RAM memory, or Random Access Memory, which is volatile and thus requires constant power to maintain. When the power is shut off, this memory is lost. This is to be compared with ROM memory, or Read Only Memory, which is more permanent as it is non-volatile and thus will be retained even when the power is off. The Registers are not considered a part of memory, as these are directly under the control of the CPU.
Different registers can hold different assigned roles, including an accumulator, which accumulates the results of the computations, an address register, which keeps tabs on where certain instructions or data is stored, and storage register, which is what actually stores the data. Registers may also just be general purpose.
The CPU Cache works for the ALU to prefetch instructions and data before they are actually needed. This is to speed up processing. The CPU cache is managed by the Cache Controller.
- slide 7 of 7
For some other basic overviews of how CPUs work, check out these links to some non technical guides with diagrams:
What Is A CPU? This one has an especially entertaining analogy between the CPU and a bar, which may make a bit more sense to some.