
How Does a Computer's Processor Work?
Definition
The original definition of a computer processor was any machine that could perform arithmetic and logic functions. Today a computer processor is usually defined as a microprocessor chip, or CPU, that executes commands and runs computer programs. One of the biggest manufacturers of microprocessors is the Intel Corporation. Typical computer programs that must be processed by CPUs include Internet browsers, word processors, and image manipulation software. Computer processors perform four basic functions to process data and run computer programs.
Fetch
Every instruction that a CPU processes is represented by a series of numbers. Once initiated, the numbers representing the requested action are stored in memory. The CPU then fetches or retrieves the instruction from program memory. A program counter, or PC, keeps track of the computer processor's location in the active program. If the memory is slow, the CPU may stall while waiting for the instruction to be returned.
Decode
The CPU then analyzes the instruction it fetched and decides how it should be processed. Typically a particular group of numbers in the instruction indicate which operation to perform, and in what sequence. In more advanced CPUs, a microprogram may also be used to help decode instructions for the computer processor. CPU microprograms can sometimes be modified (from the factory default) to change the way the processor translates instructions.
Execute
Depending on the action required, the CPU then sends segments of the original instruction to the most appropriate section of the processor. For example, if additional actions are requested, an arithmetic logic unit (ALU) is attached to a group of inputs and outputs. The inputs provide the numbers to be processed, and the outputs contain the final sum or response to the request.
Writeback
After executing the instruction, the processor writes the results back into memory. Sometimes the results are written to an internal register for quick access, while in other cases the results are written directly to the main memory. After the instruction has been executed and written to memory, the process repeats by fetching the next instruction value in the program counter. In more advanced computer processors, it is possible for multiple commands to be fetched, decoded, and executed simultaneously.