All about CPU
By Matt Wright
What Is a CPU
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 mathematical 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 below shows the setup of an extremely simple microprocessor capable of performing these actions.
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. For example, 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 (which, as stated above, is used to keep track of the CPU’s progress through a program) 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 the termination of the program.