CPU Architecture
Core Components of a CPU and Instruction Cycle
CPU Architecture (Quick Summary)
The CPU (Central Processing Unit) is the brain of the computer, responsible for processing logical and mathematical instructions.
1. Core Components
- ALU (Arithmetic Logic Unit): The circuit responsible for mathematical (add, subtract) and logical (AND, OR, NOT) calculations.
- CU (Control Unit): The control circuit that directs and fetches instructions (Fetch) from Memory to decode them (Decode).
- Registers: Very small memory units that are located directly on the CPU (the fastest in the system).
PC (Program Counter): Stores the address of the next instruction to be executed.IR (Instruction Register): Stores the instruction currently being processed.ACC (Accumulator): Temporarily stores the calculation results from the ALU.
2. Instruction Cycle
The basic cycle (Machine Cycle) that the CPU repeats continuously:
- Fetch: Fetches the instruction from Memory (RAM or Cache) to the
IR. - Decode: The CU decodes the instruction to determine what it is (add, move data, jump).
- Execute: Sends it to the ALU or other components to calculate according to the instruction.
- Store (Write Back): Stores the result back to a Register or Memory.