A1.1.1

Describe the functions and interactions of the main CPU components

The CPU is the primary computational (计算的) engine of the computer, responsible for executing instructions.

4 min read770 words

CPU

  • A hardware component (组成部分) that performs:
    • Arithmetic (算数, 计算)
    • Logical or input/output operations, to process data from input devices into useful information.

Block Diagram of CPU

CPU block diagram showing the control unit, arithmetic logic unit, primary and secondary memory, input, and output.

Key Components of CPU

A component is a distinct functional unit within the CPU with a specific role in the processor’s operation.

  • Control Unit (CU)
  • Arithmetic Logic Unit (ALU)
  • Registers (寄存器): IR, PC, MAR, MDR, CIR, AC
  • Cache (高速缓存): L1, L2, L3
  • Buses (总线): Control Bus, Data Bus, Address Bus

Control Unit

  • Orchestrates the fetch-decode-execute cycle.
  • Decodes/interprets instructions fetched from memory and generates control signals to activate hardware units within the CPU.
  • Involves parsing (解析) the instruction’s opcode, which determines the specific action (read/write data, compute, test logic).

Arithmetic Logic Unit (ALU) 算数逻辑单元

  • Performs arithmetic and logical operations — where actual computation happens (addition, subtraction, AND, OR, NOT, etc.).
  • Works with the Accumulator (ACC) or general-purpose registers to store results.
  • Receives control signals from the CU telling it which operation to do.

Registers 寄存器

A small-capacity, very fast storage location within the CPU, used to store data temporarily during program execution. Holds instructions, storage addresses, or data.

  • PC (Program Counter): Holds the address of the next instruction. Incremented automatically (most commonly at the end of fetch). 指向了 CPU 接下来要从主内存 (RAM) 中取出的那条指令。
  • IR (Instruction Register): Holds the current instruction being executed. Temporary holding area before decode/execute.
  • MAR (Memory Address Register):
    • Stores the memory address where the next data/instruction is to be found or stored.
    • Can also hold a destination address for processed data.
    • Connects to primary memory via the Address Bus.
  • MDR (Memory Data Register):
    • Holds data or instructions being transferred to/from primary memory.
    • Works with MAR: the MAR address determines which data is loaded into MDR.
    • After processing, the ALU places results into MDR, which is written to RAM at the MAR-specified address.
    • The Data Bus transfers data between RAM and MDR.
  • ACC (Accumulator): Special-purpose register storing intermediate operation results. Often used for arithmetic/logical operations. ALU’s专用 register.

Buses 总线

A shared communication pathway which transfers data between components within a computer.

  • Control Bus
    • Carries control signals (not data) from the CU to other components, managing actions and timing.
    • Can be unidirectional or bidirectional.
    • Handles read/write, interrupts, timing, acknowledgments.
  • Data Bus
    • Pathway for transferring actual data between CPU, memory, and other components.
    • Width affects speed (e.g., 32-bit vs 64-bit).
    • Bidirectional — store (CPU → component) or load (component → CPU).
  • Address Bus
    • Carries memory addresses from CPU to specify where data is read/written. (where → address)
    • Unidirectional — only CPU sends addresses to components.

Types of CPU processors

Single-core processor

  • Has one processing unit (core) in a single circuit. Reads and executes instructions from processes.
  • Singular processing path — handles one instruction at a time (sequential execution).
  • Standard in early CPUs and older computers, where task completion relied on linear instruction processing.
  • Main limitation: poor at parallel processing demands. As tasks grow complex and multitasking becomes essential, single-core processors hit performance bottlenecks (瓶颈).

Multi-core processor

  • A single chip containing two or more independent cores, each capable of executing instructions in parallel.
  • Handles multiple instructions at once → significantly better performance than single-core, especially for multitasking and parallel tasks.
  • Ideal for multitasking, gaming, and servers.
  • Software must be specifically written to leverage multiple cores.
  • Improves performance/efficiency by distributing workloads across cores (big task → sub-tasks → each completed by one core simultaneously).

Co-processor

  • Specialized processors that supplement the main CPU, offloading (分流) specific tasks to optimize performance.
  • Can be integrated into the CPU or exist as separate entities.
  • Free the main CPU to focus on general processing.
  • Examples: GPUs, audio processors, DSPs (Digital Signal Processors).
  • Used for: graphics rendering, mathematical calculations, data encryption (加密).

Start typing to search all published objectives.