Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

Unit 1: CPU — ALU, Control Unit & Registers

Lesson 8 of 34 in the free Fundamentals of IT & Computers notes on Siksha Sarovar, written by Rohit Jangra.

Unit I — CPU: ALU, Control Unit & Registers

The Central Processing Unit (CPU) is the brain of the computer. It is responsible for fetching, decoding, and executing instructions. The CPU consists of three core components: the Arithmetic Logic Unit (ALU), the Control Unit (CU), and Registers.

---

Arithmetic Logic Unit (ALU)

The ALU performs all computation inside the CPU.

Arithmetic Operations:

  • Addition, Subtraction, Multiplication, Division
  • Increment (add 1), Decrement (subtract 1)

Logical Operations:

  • Comparison: Greater than, Less than, Equal to
  • Boolean: AND, OR, NOT, XOR, NAND, NOR

The ALU receives operands from registers, performs the operation, and stores the result back in a register or memory.

---

Control Unit (CU)

The Control Unit is the manager of the CPU. It does not perform calculations but directs all other components.

Functions of the Control Unit:

  1. Fetch — Retrieves the next instruction from memory.
  2. Decode — Interprets the instruction to determine what operation is needed.
  3. Execute — Signals the ALU, memory, or I/O to carry out the operation.
  4. Store — Writes the result back to memory or a register.

This sequence is called the Fetch-Decode-Execute (FDE) cycle or instruction cycle.

---

Registers

Registers are the fastest and smallest memory units, located inside the CPU itself.

RegisterFull NamePurpose
PCProgram CounterHolds the address of the next instruction
IRInstruction RegisterHolds the currently executing instruction
ACCAccumulatorStores intermediate ALU results
MARMemory Address RegisterHolds the memory address to be accessed
MDRMemory Data RegisterHolds data read from or written to memory
SPStack PointerPoints to the top of the stack
General PurposeR0–R7 etc.Temporary storage during execution

---

CPU Clock Speed

  • The CPU operates in synchronisation with a clock signal.
  • Speed is measured in GHz (gigahertz) — billions of cycles per second.
  • Higher clock speed → more instructions executed per second.

---

Instruction Cycle (FDE Cycle)

  1. Fetch: PC → MAR → Memory sends instruction → MDR → IR
  2. Decode: CU interprets the opcode in IR
  3. Execute: ALU or memory operation is carried out
  4. Increment PC: PC points to next instruction
Key Takeaway: The CPU's ALU handles all calculations, the Control Unit orchestrates every operation, and registers provide ultra-fast temporary storage. The Fetch-Decode-Execute cycle is the heartbeat of every computer — one cycle per instruction.