Module1 - PartA - Dr. Ilavarasi
Module1 - PartA - Dr. Ilavarasi
31 July 2023
Carl Hamacher, Zvonko Vranesic, Safwat
Zaky, Computer organization, Mc Graw
Hill, Fifth edition ,Reprint 2011.
W. Stallings, Computer organization and
architecture, Prentice-Hall, 8th edition,
2009
REFERENCE BOOK
David A. Patterson and . John L.
Hennessy ―Computer Organization
and Design-The Hardware/Software
Interface‖ 5th edition, Morgan
Kaufmann, 2011.
GRADING POLICY
Digital Assignment 1= 10 marks (Written
Assignment, Rubric based Evaluation)
Chennai
Dr. Ilavarasi A K, VIT
Digital Assignment 2 & 3 = 20 marks (Quiz)
4
OUTLINE
Introduction to computer systems
Overview of Organization and
Chennai
Dr. Ilavarasi A K, VIT
Architecture
Functional components of a computer
Interconnection architecture
5
INTRODUCTION TO COMPUTER SYSTEMS
A computer system is a electronic device
Chennai
Dr. Ilavarasi A K, VIT
Accepts digitized input information
o Process it according to a list of internally stored
instructions
o Produces the resulting output information
• The list of instructions are called computer program
• Internal storage is via computer Memory
6
INTRODUCTION TO COMPUTER
SYSTEMS
Chennai
Dr. Ilavarasi A K, VIT
with the help of application software
Application software communicates
with the operating system and returns
the results of required operation
7
Dr. Ilavarasi A K, VIT
Chennai
8
HARDWARE COMPONENTS
SYSTEM SOFTWARE
Operating System
Chennai
Dr. Ilavarasi A K, VIT
Interfaces between a user’s program and the
hardware and provides a variety of services and
supervisory functions
Compilers
A program that translates high-level language
statements into assembly language statements
Assembler
A program that translates assembly language
statements in to 1’s and 0’s
9
HIGH LEVEL TO HARDWARE LANGUAGE
Chennai
Dr. Ilavarasi A K, VIT
Mov A, R1
Add B,R1
Mov R1, C
10
POWER OF ABSTRACTION
Chennai
Dr. Ilavarasi A K, VIT
High level language Assembly language Binary machine
program in C program language program
11
COMPUTER ORGANIZATION?
Chennai
Dr. Ilavarasi A K, VIT
Encompasses all
physical/hardware aspects of
computer systems.
Eg., circuit design, control
unit, memory chip.
How does a computer work?
12
COMPUTER ARCHITECTURE?
Chennai
Dr. Ilavarasi A K, VIT
Logical aspects of system
implementation as seen by
the programmer.
Eg., instruction sets,
instruction formats,
addressing modes.
How do I design a computer?
13
FUNCTIONAL COMPONENTS OF A COMPUTER
CPU
ALU
Chennai
Dr. Ilavarasi A K, VIT
Control
Input Data Unit Data
Output
Registers
Data
15
Memory
FUNCTIONAL
COMPONENTS OF A
COMPUTER
CPU
ALU (Arithmetic & Logic Unit): This unit
performs the data processing functions of a
computer
Control unit:
Coordinates the tasks between the
computer components.
It takes the data from input devices
Chennai
Dr. Ilavarasi A K, VIT
transfer of data across the functional units
of a computer like CPU, main memory and
I/O devices
24
WHERE OPERATING SYSTEM WILL BE
STORED IN COMPUTER?
WHERE OPERATING SYSTEM WILL BE STORED
IN COMPUTER?
Storage
WHAT IS RAM?
The information stored in this type of memory is
lost when the power supply to the PC or laptop
is switched off.
SRAM DRAM
Dr. Ilavarasi A K, VIT
Chennai
32
Secondary memory REGISTERS
Register is memory unit inside the
33
REGISTERS
Registers have 2 specific roles:
34
USER VARIABLE REGISTERS
These registers are 4 types:
1. General purpose
Chennai
Dr. Ilavarasi A K, VIT
2. Data
3. Address
4. Condition codes
35
GENERAL PURPOSE REGISTERS
36
DATA REGISTERS
These registers only holds the data
The restriction of these registers is, these
Chennai
Dr. Ilavarasi A K, VIT
can not be used for operand address
calculation
37
ADDRESS REGISTERS
There are different categories of address registers
1. Segment pointers:
Chennai
Dr. Ilavarasi A K, VIT
a. These holds segments base address
b. There may be multiple registers
2. Index registers:
a. These can be used for indexed addressing
b. Autoindexed
3. Stack pointers: for user variable stack addressing, top
of the stack is pointed by a dedicated register
38
CONTROL AND STATUS REGISTERS
The operation of the processor is controlled
Chennai
Dr. Ilavarasi A K, VIT
These registers are not visible to the user on most of
the machines
Some of these registers are visible in operating system
mode
39
CONTROL AND STATUS REGISTERS
There are 4 registers, which are important for execution
of an instruction
Chennai
Dr. Ilavarasi A K, VIT
1. Program counter: This register contain an
instruction address selected for fetching
2. Instruction register: Most recently fetched
instruction is stored in this register
3. Memory address register: This register holds the
address of the instruction in memory
4. Memory data/ buffer register: The data in this
register is either read from memory or written to
memory 40
CONTROL AND STATUS REGISTERS
Program status word (PSW): This register contains
status information. This also contains condition codes as
Chennai
Dr. Ilavarasi A K, VIT
well as some status information. Common fields or flags
of this register contain the following:
a. Sign
b. Zero
c. Carry
d. Equal
e. Overflow
f. Interrupt enable/disable
g. Supervisor 41
REGISTER FILE
Register file is a structure that stores the processor’s
32 general purpose registers
Chennai
Dr. Ilavarasi A K, VIT
It contains a register state of the computer.
42
REGISTER FILE
Registe
r
A register file with four inputs
Numbe 5 Read and two outputs are shown in the
Register1
Chennai
Dr. Ilavarasi A K, VIT
r Read figure.
5 Data1
Read
Register2 Registers Data
5
Read
Register3 Read
Data Data2
Write
Data
43
RegWrite
REGISTER FILE
For reading of each data word from the registers, the
following are needed
1. Input – number of the register to be read
Chennai
Dr. Ilavarasi A K, VIT
2. Output – this will carry the value that has been
read from the registers
44
REGISTER FILE
Write of data word needs two inputs:
1. Specifies the number of the register to be written
Chennai
Dr. Ilavarasi A K, VIT
2. Supplies the data to be written into the register.
It outputs the contents of Read register inputs (i.e.
register number).
45
Dr. Ilavarasi A K, VIT
Chennai
46
INTERCONNECTION ARCHITECTURE
Chennai
Dr. Ilavarasi A K, VIT
47
INTERCONNECTION OF COMPONENTS
Chennai
Dr. Ilavarasi A K, VIT
Program Counter (PC) is specialized register
Keep track of the execution of a program
It contains memory address of the next
instruction to be fetched and executed
During the execution of an instruction, the
contents of the PC are updated to correspond to
the address of the next instruction to be executed
PC points to the next instruction that is to be
fetched from memory.
48
INTERCONNECTION OF COMPONENTS
Chennai
Dr. Ilavarasi A K, VIT
The Instruction Register (IR):
Holds the instruction that is currently
being executed
Its output is available to the control
circuits
Generates the timing signals that
control the various processing elements
involved in executing the instruction 49
PROCESSOR- MEMORY INTERACTION
Chennai
Dr. Ilavarasi A K, VIT
Two registers facilitates communication
with the memory
Memory Address Register (MAR)
holds the address of the location to be
accessed
Memory Data Register (MDR)
Contains the data to be written into or read
out of the addressed location 50
TYPICAL OPERATIONAL STEPS
Programs reside in the memory
Chennai
Dr. Ilavarasi A K, VIT
Execution of the program starts when PC is set to
point to the first instruction of the program
The content of the PC are transferred to MAR
A read control signal is sent to the memory
The addressed word is read out of the memory and
loaded into the MDR
Next, the contents of the MDR are transferred to the
IR
At this point the instruction is ready to be decoded and
executed 51
TYPICAL OPERATIONAL STEPS
Chennai
Dr. Ilavarasi A K, VIT
sending its address to the MAR and initiate read cycle
Operand is read from the memory to MDR, then it is transferred
from MDR to ALU
After one or more operands are fetched in this way, the ALU can
perform the desired operation.
If the results of this operation is to be stored in the memory, the
results is sent to MDR
The address of the location where the result is to be stored is sent
to the MAR, and write cycle is initiated
52
REFERENCES
Chennai
Dr. Ilavarasi A K, VIT
1. Carl Hamacher, Zvonko Vranesic,
Safwat Zaky, Computer organization,
Mc Graw Hill, Fifth edition ,Reprint
2011.
2. David A. Patterson and . John L.
Hennessy “Computer Organization and
Design-The Hardware/Software
Interface” 5th edition, Morgan
Kaufmann, 2011.
53