Central Processing Unit

Introduction

The Central Processing Unit (CPU) is the brain of a computer. It performs all processing operations, executes instructions, and controls other hardware components. The CPU's speed and efficiency determine a computer’s overall performance.


Components of CPU

1. Arithmetic Logic Unit (ALU)

  • Performs arithmetic operations (addition, subtraction, multiplication, division).
  • Executes logical operations (AND, OR, NOT, comparisons).

2. Control Unit (CU)

  • Directs the flow of data and instructions within the CPU.
  • Fetches, decodes, and executes instructions from memory.
  • Controls communication between the CPU and other components.

3. Memory Unit - Registers

  • Small, high-speed memory units within the CPU.
  • Temporarily store instructions, data, and addresses.

Types of registers:

  • Accumulator (AC) – Stores results of calculations.
  • Program Counter (PC) – Holds the address of the next instruction.
  • Instruction Register (IR) – Stores the current instruction being executed.

Working of CPU (Instruction Cycle - Fetch, Decode, Execute)

  • Fetch – The CPU retrieves an instruction from memory.
  • Decode – The instruction is interpreted by the Control Unit.
  • Execute – The ALU performs calculations or logic operations.
  • Store – The result is saved in a register or sent to an output device.

Types of CPU Architecture

CISC (Complex Instruction Set Computing)

  • Supports many complex instructions.
  • Examples: Intel x86, AMD processors.

RISC (Reduced Instruction Set Computing)

  • Uses simpler, faster instructions.
  • Examples: ARM processors (used in smartphones, tablets).

CPU Performance Factors

  • Clock Speed (GHz) – Determines how many instructions a CPU can process per second.
  • Number of Cores – More cores allow multiple tasks to run simultaneously.
  • Cache Memory – High-speed memory that stores frequently used data for quick access.
  • Threading & Multitasking – Enables better processing of multiple tasks.

Popular CPU Brands

  • Intel – Core i3, i5, i7, i9, Xeon.
  • AMD – Ryzen 3, 5, 7, 9, Threadripper.
  • Apple – M1, M2 processors.
  • Qualcomm – Snapdragon (used in mobile devices).