Thanks Wingz
All CPUs (that I know of) use the stored-program concept of computing...the memory stores instructions and data, and the CPU fetches the instructions, executes them, and stores the results back into memory.
There are three main classes of instructions (from a RISC model perspective):
- Arithmetic/Logical: performs arithmetic (add, subtract, multiply, etc) and logical (AND, OR, NOT, etc) operations on operands. The instructions are executed by the Arithmetic/Logical Unit (ALU), and typically use registers as temporary storage for the operands.
- Load/Store: fetches or stores data from the memory into the register file.
- Branch/Jump: Conditionally/Unconditionally changes the flow of instruction execution. Normally the CPU executes instructions serially (ie, instruction at address X, then X+1, then X+2, etc). A branch instruction might dictate that if register X is less than 0, branch to instruction at address Y.
For a bit more detailed architectural and logical explanation, check out my last two posts in the thread Wingz linked.