CPU
Also known as the computer processor is responsible for executing the commands for the computer.Take care when handling your CPU especially when installing onto the motherboard.After running for a while modern CPUs get really hot so to help it stay cool it is necessary to insert a heat sink and a fan directly on top of the CPU.
A CPU has four primary functions: Fetch,Decode,Execute and writeback.
FETCH
The CPU retrieves the instruction that it needs to run from program memory.
Each instruction in a program is stored at a specific address. The CPU has a program counter, which keeps track of the CPUs position in the program.
DECODE
It’s important to know that no matter what code a program is written in, the compiler for that specific language breaks the code down to Assembly Language. Assembly language is a language that the CPU understands, but may vary between different CPUs.
EXECUTE
Based on the instructions it is given, the CPU can then do one of three things:
1) Using its Arithmetic Logic Unit (ALU), the CPU can calculate extremely complicated functions.
2) Move data from one memory location to another.
3) Jump to different addresses in the program based on decisions made by the CPU itself.
The diagram above shows the setup of an extremely simple microprocessor capable of performing these actions.
WRITEBACK
Typically, each of the actions taken by the CPU produces some sort of output.The CPU takes this output and writes it into the computer’s memory.
If a program wanted to execute the first item of the list above on two operands, 3 and 5, the output, 8, would be written back into a specific address. However, for the 3rd bullet, the program counter simply changes to reflect the start of the next set of instructions.When these four steps have been completed, the Program Counter moves onto the next instruction and repeats the entire process again until you close the program.
Another important component of a CPU is called the “clock.” The clock produces a signal that acts to synchronize the logic units within the CPU as they execute the instructions given in a program. In the diagram above, the purple line represents the signal of a clock as it is being inputted into a logic unit. For every time the line goes from low to high, and back to low,an instruction is carried out.