Professional Documents
Culture Documents
Cathod Ray
Tubes
(CRT)
Analogue
world
Second Generation Computers 1955-65
Transistors
Electronics!
Second Generation Computers
Third Generation Computers 1965-75
Integrated Circuits
Fourth Generation Computers 1975-
onwards
Keyboard
Mouse
Network
Touch-screen
Microphone
Web-cam
Output Unit:
Printer, screen, etc.
Memory unit
RAM: Random
Access Memory
Cache (on
processor)
Secondary
Storage(?): Disk,
CD, tape, etc. -- I/O
or memory?
Arithmetic and
Logic unit:
Combinational,
Sequential Logic
circuits
Can do
“computation”
Contains “registers”
Control unit:
“coordinates” work of
other units
Personal
Computers
Laptop/Desktop
These are also computers!
Micro-controller
These are also computers!
Micro-controller
These are also computers!
Server
These are also computers!
Super computers
Basic Operation
Harvard
Architecture
IR: Instruction
Register
Instruction currently
being executed
R0...Rn-1
General purpose
registers for storing
data
CPU’s job
1) Fetch an instruction (stored in RAM) at address given by Program
Counter (PC)
2)Decode and Run that instruction
● May fetch data from RAM for this
● May take different time for different instructions
● Normally ALU gets used in this step
3) (Increment or change PC and) goto (1)
● Increment of PC is the default (happens “sometimes” during this cycle)
● Unless instructions like “branch” or “call” change the PC to some other value
Don’t forget!
●Instruction’s must be in RAM for them to be executed
● CPU can’t execute instructions on disk, network, etc.
● Your programs, operating system kernel code, other system programs
(compiler, etc), Graphical environment, libreoffice code, device drivers
(program to access I/O devices), etc. MUST BE in RAM to be executed
● Data is fetched from RAM as part of execution of an instruction (Step-2)
●How do the instructions actually go in RAM?
● We will learn this in Operating Systems course.
● As of now, assume that instructions are there in RAM!
Example
● Need to add two numbers, stored at Loc1 and Loc2
in RAM, and write them back to a third location
Loc3 in RAM
LOAD R1, Loc1
Load R1, Loc2
Add R1, R2
Store R1 Loc3
CPU’s “routine” may be
interrupted
● A device may raise an “interrupt”
● Now PC changes to a “pre-defined” location
– Some meaningful code should be there at this
“pre-defined” location
– Taken care by the OS-kernel
– “Interrupt Service Routine” code