Computing The CPU
Computing MODULE 6 - THE CPU
What is the CPU?
The Central Processing Unit (CPU) executes instructions, performs calculations, and processes data from software apps and hardware.
CPU Cycle
A CPU cycle is the basic unit of time for operations, measured in Hertz (Hz), with modern CPUs operating in Gigahertz (GHz).
The system clock synchronizes CPU operations, where each tick represents a CPU cycle.
Instruction Processing
Instruction processing may require multiple CPU cycles (e.g., fetching, decoding, executing).
Pipelining optimizes efficiency by overlapping instruction execution.
Basic Components of the CPU
Control Unit (CU): Manages operations, fetches, and decodes instructions.
Arithmetic Logic Unit (ALU): Performs arithmetic and logical operations.
Accumulator: Temporarily stores results of calculations.
Single Core vs. Multi-Core CPU
Single-Core: Executes tasks sequentially.
Multi-Core: Executes tasks in parallel, enhancing multitasking.
Opcodes and Operands
Opcode: The instruction code specifying operations (e.g., ADD).
Operand: The data or memory location the opcode acts upon.
Architecture & Address Space
Includes CPU, memory, and I/O components. Address space is determined by address bus width.
Summary of Fetch Execute Cycle
Fetch: Retrieves the instruction from memory using the Program Counter (PC).
Decode: Control Unit (CU) decodes the instruction and identifies operands.
Execute: ALU performs the operation using the operands based on control signals from the CU.
Store: Writes the results back to memory or registers as needed.
Components Summary
Address Bus: Carries addresses (unidirectional).
Data Bus: Transfers data (bidirectional).
Control Bus: Sends control signals (bidirectional).