

The Central Processing Unit (CPU), also called a microprocessor, or simply a processor, is the very heart of a computer. It located on the motherboard and is an integrated circuit that contains millions and millions of transistors and other electrical components. The CPU is a mere small silicon chip, and yet it runs the whole computer!
Functions of the CPU:
The central processing unit performs a couple of basic functions. First of all, in order for a computer to operate, it needs instructions to tell it what to do. It gets these instructions in the form of software. Software can come in two forms. Operating system software tells the computer how it is to be run, while application software are applications (duh!) such as games, word processors, and media players (for more information about software, see the "software" section of this site). It is up to the CPU to decipher what exactly the software instructions are telling the computer to do. After decoding these instructions, the CPU will then perform a series of computations to carry out these tasks. The Arithmetic/Logic Unit (ALU) is the part of the central processing unit that performs various calculations and comparisons. Some of its tasks are as simple as the basic operations of addition, subtraction, multiplication, and division, while others are so complex that it would take human beings years to complete!
In addition to interpreting and executing instructions, the CPU can also move data from one memory location to another. When data is stored in the RAM (random-access memory), the main memory of a computer, it is given an address. This address can be analogous to your house address. It is used to indicate where certain data is, just like the address to your house can be used to help indicate to people where exactly your house is located. (See the section about RAM for more information). Well, whenever the CPU wants to access a certain piece of data, a bus (a pathway inside the computer that is used to transport information from one area to another, especially from the CPU to the memory and vice versa) know as the address bus will send the address to the memory, and then another type of bus, the data bus, will receive the data from the memory. For more information on how this information is transported, see the section about buses.
Another of the CPU's basic functions is that it can make certain decisions about how the computer is operated, and based on these decisions, the CPU can jump from one instruction to another. It does not necessarily have to execute the instructions in sequential order, but rather, it can skip to different instructions. For example, the CPU does not have to perform the instruction it is first given before all the other instructions. Instead, by jumping around, it can perform the fourth instruction it was given before the third instruction.
The central processing unit also has a pipelining technology that allows it to perform many different instructions simultaneously. This technology helps to make the CPU extremely powerful!
Parts of the CPU:
The control unit supervises all of the CPU's operations. It fetches the software instructions from the memory, and it also coordinates the times and order in which the instructions are carried out. For example, the control unit has a special feature known as the interrupt. An interrupt is exactly what the term means! It is a special signal that interrupts the task the central processing unit is currently performing. It will tell the CPU to put aside this operation and to instead begin work on another operation.
The instruction decoder deciphers the instructions for the CPU so that they can be executed and carried out.
The program counter is a special latch. It advances by one whenever new instructions are picked up, and thus it sequentially goes through the tasks the CPU must perform. However, there are certain instructions that can tell the CPU to jump to another set of instructions that are not next in the sequence.
As mentioned above, the arithmetic/logic unit is the part of the central processing unit that does the actual computing. Data is brought here, where it is operated on. The ALU can not only do addition, subtraction, multiplication, and division, but it can also perform logical operations. An example of a logical operation is comparisons. When given two numbers, the ALU can determine if one is greater than the other or if they are equal. This is particularly useful because the ALU could have instructions saying, "perform this operation if these two numbers are equal, but perform this other operation if the first number is greater than the second." By using its logical capabilities, the ALU can carry out these instructions! For more information on how the ALU works, see the section on the binary system and the section on Boolean Logic.
Registers are special storage locations located inside the CPU. The data contained here can be accessed much quicker than the data contained in other memory locations, such as the RAM (random-access memory) and the ROM (read-only memory).
Registers in different parts of the CPU are used for different functions. In the control unit, the registers are used to store the computer's current instructions and the operands (this is merely a fancy term for data that is being operated on by the CPU). Meanwhile, the registers found in the ALU, called accumulators, are used to store the results of the arithmetic or logical operations.
The clock is a timer that acts as a heartbeat for the central processing unit. At regular intervals, it will release an electrical signal that sends a pulse through the CPU's circuitry. Usually, small tasks can be completed between pulses, but more complex tasks might take up to several pulses before they can be finished. It is by this clock that we can calculate the speed of a processor. The speed of a CPU is measured in megahertz's (MHz). Most modern computers have speeds of at least 90 MHz.
Path of data flow through the CPU:
2. These software instructions make their way to the RAM, or random-access-memory.
3. The CPU 's control unit fetches the instructions and brings them to the CPU.
4. The instructions are stored in special registers in the CPU, and the program counter increments, allowing the instructions to be sequentially performed.
5. When the CPU is ready, the instructions coming next in the sequence are sent to the instruction decoder. It is then determined what exactly the instructions say and what the computer must do.
6. The address bus and data bus now come into use. The address bus will send the address of the data that the CPU needs to the memory, and then the data bus will retrieve the data found at that address.
7. Finally, the instructions are carried out in the ALU, where the computations are made.
8. After the results of the operations are calculated, they are temporarily stored in registers in the CPU for quick and easy access.
1995-2001, ThinkQuest Inc.all rights reserved



