COA - Chapter # 7
COA - Chapter # 7
COA - Chapter # 7
CHARACTERISTICS AND
FUNCTIONS
CHAPTER # 7 Computer Organization & Architecture
What is an Instruction Set?
S H E H E R YAR MALI K
Data processing
Data storage (main memory)
Data movement (I/O)
Program flow control
3 addresses
Operand 1, Operand 2, Result
a = b + c;
ADD a, b, c
May be a forth - next instruction (usually implicit)
Not common
Needs very long words to hold everything
2 addresses
One address doubles as operand and result
a=a+b
ADD a, b
Reduces length of instruction
Requires some extra work
Temporary storage to hold some results
1 address
Implicit second address
ADD a
Usually a register (accumulator)
Common on early machines
0 (zero) addresses
All addresses implicit
Uses a stack
e.g. c = a + b
push a
push b
Add
pop c
More addresses
More complex (powerful?) instructions
More registers
Inter-register operations are quicker
Fewer instructions per program
Fewer addresses
Less complex (powerful?) instructions
More instructions per program
Faster fetch/execution of instructions
Operation range
How many ops?
What can they do?
How complex are they?
Data types
The various types of data upon which operations are performed
Instruction formats
Instruction length in bits
Length of op code field
Number of addresses
Size of various fields, etc.
Registers
Number of CPU registers available
Which operations can be performed on which registers?
Addressing modes
RISC v CISC
Addresses
Numbers
Integer/floating point
Characters
ASCII etc.
Logical Data
Bits or flags
8 bit Byte
16 bit word
32 bit double word
64 bit quad word
128 bit double quadword
Addressing is by 8 bit unit
Words do not need to align at even-numbered
address
Data accessed across 32 bit bus in units of double
word read at addresses divisible by 4
Little endian
Chapter # 7 Computer Organization & Architecture 18
x86 Numeric Data Formats
S H E H E R YAR MALI K
Data Transfer
Arithmetic
Logical
Conversion
I/O
System Control
Transfer of Control
Specify
Source
Destination
Amount of data
May be different instructions for different
movements
e.g. IBM 370
Or one instruction and different addresses
e.g. VAX
Bitwise operations
AND
OR
NOT
Test
Compare
Privileged instructions
CPU needs to be in specific state
Ring 0 on 80386+
Kernel mode
For operating systems use
Branch
e.g. branch to x if result is zero
Skip
e.g. increment and skip if zero
ISZ Register1
Branch xxxx
ADD A
Subroutine call
c.f. interrupt call