A processor contains parts with different roles. Registers hold values close to the working circuits. The arithmetic logic unit, or ALU, performs arithmetic and logical operations. The control unit coordinates transfers and selects the required operation. These roles explain how stored bits become the inputs and results of a computation.
An instruction tells the processor which action to perform. Its opcode identifies that action, while other parts may identify data or locations. The instruction set is the collection of commands a processor supports. In a stored-program design, instructions are represented as data that can be loaded into memory.
Source excerpt +
The specific part of an instruction that identifies the operation to be performed is called the Opcode.
The program counter holds the address used to find the next instruction. Fetching retrieves an instruction from memory, and an instruction register holds it for processing. During decoding, the control unit interprets the instruction. Execution then activates the circuitry needed to carry out the requested operation on its inputs.
A program need not follow addresses in a simple straight sequence. A jump changes the next instruction address. A conditional branch selects a path based on a condition, such as an ALU result flag. In the model described here, a zero flag indicates that an operation produced zero, helping programs make decisions and repeat work.
Source excerpt +
The Program Counter is a high-speed storage location that holds the memory address of the next instruction to be executed.