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:

  1. Fetch: Fetches the instruction from Memory (RAM or Cache) to the IR.
  2. Decode: The CU decodes the instruction to determine what it is (add, move data, jump).
  3. Execute: Sends it to the ALU or other components to calculate according to the instruction.
  4. Store (Write Back): Stores the result back to a Register or Memory.

AI Knowledge Assistant

สวัสดีครับ! ผมคือ AI Assistant ประจำเว็บไซต์

คุณสามารถสอบถามข้อมูลด้าน Computer Science, Business, หรือ Finance ได้เลยครับ