CAO - M01 - Introduction To Computer Architecture and Organization
CAO - M01 - Introduction To Computer Architecture and Organization
| MODULE 01
Reference
• Computer Architecture
• Logical Layout
• Attributes of a system visible to a programmer (or)
• Attributes that have a direct impact on the logical execution of
a program
• Instruction Set Architecture (ISA)
• Defines instruction formats, opcodes, data, memory,…
Overview
• Computer Organization
• Operational units and their interconnections
• Organization is done based on architecture
• Physical Components
Structure & Functional Components
Function – The
Structure – How the
operation of each
components are
component as part of
interrelated.
the structure.
Functional
Components
• Data Processing
• Data Storage
• Volatile / Permanent
• Control Unit
How does a program get
executed?
How does a program get executed?
Levels of Programming Languages
Structural Design – Single Core
• CPU – Processor
• Main Memory – Stores the data
• I/O – Data movement
• System Bus – Provides communication
between CPU, Memory, I/O
• Main Memory
• Secondary Memory
• Non-volatile
Main Memory
• Closely connected to the processor
• Stored data are easily changed, but changes are slow compared to main
memory
Storage
Memory Unit – Classification
Memory
Secondary
Primary Memory
Memory
Hard disk
drive
Solid state
RAM ROM drive
Flash drive
PROM CD, DVD
Static
EPROM Magnetic
RAM
Dynamic EEPROM tapes
RAM Flash
memory
21
RAM vs ROM
SRAM vs DRAM
Levels of Memory Hierarchy
Capacity
Access Time Upper Level
Cost
CPU Registers faster
100s Bytes
1s ns Registers
Cache Instr. Operands
K Bytes
4 ns Cache
1-0.1 cents/bit
Main Memory Blocks
M Bytes
100ns- 300ns Memory
$.0001-.00001 cents /bit
Pages
Disk
Files
Larger
Tape Lower Level
Registers and
Register files
Registers
1. User-visible registers
• Restricted (special purpose registers) – use for specific operations – floating point and
stack operations
• Address registers
• Segment registers – hold the base address of the segment
• Stack pointer – points to the top of the stack (if there is a user-visible stack addressing, stacks in the
memory)
Condition Code Registers - Flags
• Condition codes are bits set by the CPU hardware as the result of
operations
• Machine instructions allow these bits to be read by implicit reference
• Programmer cannot alter them
• In some machines, sub –routine call will result in the automatic saving of all
user-visible registers, to be restored on return.
• Set of individual bits – flags
• Result of last operation is zero
• The general registers are further divided into the following groups −
• Data registers
• Pointer registers
• Index registers
Connection between processor
& memory
Data Registers
Data Registers
• Some of these data registers have specific use in arithmetical operations.
• AX is the primary accumulator
• BX is known as the base register
• CX is known as the count register
• DX is known as the data register
Pointer Registers
• The pointer registers are 32-bit EIP, ESP, and EBP registers and corresponding
16-bit right portions IP, SP, and BP. There are three categories of pointer
registers −
• Instruction Pointer (IP) − The 16-bit IP register stores the offset address of
the next instruction to be executed.
• Stack Pointer (SP) − The 16-bit SP register provides the offset value within
the program stack.
• Base Pointer (BP) − The 16-bit BP register mainly helps in referencing the
parameter variables passed to a subroutine. The address in SS register is
combined with the offset in BP to get the location of the parameter.
Index Registers
• The 32-bit index registers, ESI and EDI, and their 16-bit
rightmost portions.
• SI and DI, are used for indexed addressing and sometimes used
in addition and subtraction.
• There are two sets of index pointers −
• Source Index (SI) − It is used as source index for string operations.
• Destination Index (DI) − It is used as destination index for string
operations.
8086 Microprocessor
Register Organization
8086
Segment
Registers
8086 Register
Organization
Find the Registers
Why do we
use 12-bits to
store the
address?
Structure of IAS Computer
PC
MAR
MBR
IR
IBR
AC
IAS Computer – Find the Registers’
content
PC 1
MAR 1
MBR LOAD M(X) 500, ADD M(X) 501
IR LOAD M(X) 500
IBR ADD M(X) 501
AC
IAS Computer – Find the Registers’
content
PC 1
MAR 500
MBR 3
IR LOAD M(X) 500
IBR ADD M(X) 501
AC 3
IAS Computer – Find the Registers’
content
PC 1
MAR 501
MBR 4
IR ADD M(X) 501
IBR
AC 7
IAS Computer – Find the Registers’
content
PC 2
MAR 2
MBR STORE M(X) 500, (Other Ins)
IR STORE M(X) 500
IBR Other Ins
AC 7
IAS Computer – Find the Registers’
content
PC 2
MAR 500
MBR STORE M(X) 500, (Other Ins)
IR STORE M(X) 500
IBR Other Ins
AC 7
IAS Computer Instruction Set
IAS Computer Instruction Set
IAS Computer Instruction Set
IAS Computer Instruction Set
IAS Computer Instruction Set
IAS Computer Instruction Set
IAS Computer Instruction Set
IAS Computer Instruction Set
IAS Computer Instruction Set
Structure of IAS Computer
• Where do we fetch?
Instructio
n Cycle –
Fetch
Instructio
n Cycle –
Execute
Exercise #01
Exercise #01
Architectu
re Parallel access to data
and instructions is
possible
Harvard Architecture
Harvard Architecture
• Complex or Simple
• CISC (Complex Instruction Set Computer)
• RISC (Reduced Instruction Set Computer)
CISC
Large amount of
different and complex
instructions
Make use of complex
addressing modes
Use micro-program
control unit
Limited number of
registers.
RISC
Small and limited number of
instructions
Use a hardwired control unit
02