Central Processing Unit (CPU)
• CPU is called the heart and brain of the computer.
• It controls all the work inside the computer.
Functions of CPU:
1. Takes input → Receives data and instructions from input devices.
2. Stores data → Keeps instructions temporarily in its memory.
3. Processes data → Works on the data according to given instructions.
4. Controls other parts → Makes sure all parts of the computer work together properly.
Data Processing Cycle
The computer works in three simple steps:
1. Input → You give instructions (example: typing a number).
2. Processing → CPU works on it (example: adding numbers).
3. Output → You get results (example: answer shown on screen).
Example for class:
If you type 2 + 3 (Input),
CPU calculates it (Processing),
Screen shows 5 (Output)
:
Logic of RAM, Cache & CPU
1. CPU is very fast – but it cannot store much data.
Think of CPU as a chef who can cook very fast but has only a tiny table.
2. RAM (Main Memory) – This is where data and programs are kept while the computer is
running.
Like a kitchen shelf near the chef – bigger than the table, but still not as fast as the
chef.
3. Cache Memory – A small, super-fast memory between CPU and RAM.
Like a helper standing right next to the chef holding the most important ingredients
(recently or frequently used data).
4. How the cycle works:
o CPU first checks Cache → if data is there (fast access, called “cache hit”).
o If not in cache → it goes to RAM (a bit slower).
o If not in RAM → it goes to hard drive/secondary storage (much slower).
5. Why RAM is faster than hard disk?
o Because RAM is electronic (chips) while hard disk is mechanical (spinning parts).
That’s why CPU uses RAM while working, not the hard disk directly.
Simple Cycle (You can draw this on board):
CPU ↔ Cache ↔ RAM ↔ Hard Disk
• CPU needs data → checks cache → if not found → goes to RAM → if not found → goes
to Hard Disk.
• Cache = fastest & smallest
• RAM = bigger but slower than cache
• Hard Disk = biggest but slowest
Example for students:
When you open a game:
• Game is loaded from Hard Disk → RAM
• While playing, important data is kept in Cache for super fast response.
• CPU keeps processing from cache & RAM.
Units of CPU
Brain of the Computer = CPU
The CPU is like the brain. It has two important parts that do different jobs:
1. Control Unit (CU):
Works like the “manager” or “traffic police” of the computer.
• It gives instructions to other parts.
• Decides what to do, when to do, and where data should go.
• Controls and coordinates all activities inside the computer.
2. Arithmetic & Logic Unit (ALU):
Works like the “calculator” of the computer.
• Performs all maths (addition, subtraction, multiplication, division).
• Performs all logic (comparison like greater than, equal to, smaller).
• Actually processes the data given by the Control Unit.
In short:
• CU = Manager (controls and guides everything).
• ALU = Worker (does the actual calculations and decisions).
Outline fir the Test topics… …
Chapter 1: Introduction to Computers and Their Usefulness in Society
• 1.1 History of Computers
• 1.2 The Computer Generations
• 1.4 Definition of Computer
• 1.5 Types of Computers
• 1.6 Classification of Digital Computers
• 1.7 Software
Chapter 2: Introduction to Computer System
• 2.1 Input Devices
• 2.2 Central Processing Unit (CPU)
• 2.3 Output Unit