Professional Documents
Culture Documents
Instructions Formats: July 15, Monday
Instructions Formats: July 15, Monday
Instructions Formats: July 15, Monday
July 15 ,Monday
Outline
Instruction Set:
Characteristics and Functions
IAS Instruction set
LOAD MQ ACMQ
PC 21
MAR 501
500
21
MBR LOAD
STOR
M(X)
M(X)500,
500,
3 ADD
4 (Other
M(X)
Ins)501
IR LOAD
STOR
ADD M(X)M(X)
IBR ADD
(Other
M(X) Ins)
501
AC 7
3 501
AddIBR
M(X) PC
PC←
Mar
MAR = 12
= PC
←PC
3 M(X) 501
LOAD M(X) 500, ADD
4
STOR M(X) 500, (Other Ins)
IR MAR
MAR
MAR=
MAR ==500
12
501
=500
add = 501
add =
add 500
add==12
Example Problems
Write an Assembly language programming for the following expressions
using IAS computer Instruction set and interpret to the flow of IAS
computer
1. A=(B-C)*D
2. A=B*(C+D)
• Increment PC
– Unless told otherwise
Operation performed
number of operand addresses
and addressing modes.
Based on number of operand address in the instruction.
4 Address Instruction
3 Address Instruction
2 Address Instruction
1 Address Instruction
0 Address Instruction
General Register Organization
The instruction
Format in this type
Of computer need
Three address fields
Assumptions
24-bit memory address (3 bytes)
128 instructions (7 bits rounded to 1 byte)
4 –address Instruction
Because of the large instruction word size and number of
memory accesses the 4- address machine and instruction
format is not seen machine design.
Although the 4-address structure is used internally in
some implementations of
computer control units. This kind of controller
implementations is known as micro
coded Control.
Memory 4- Address Instruction
24 Bits / 3 Bytes 8 24 24 24 24
CPU OpCode
Op Code ResAddr
ResAddr Op1Addr
Op1Addr Op2Addr
Op2Addr NextiAddr
NextiAddr
Op1
Example: add M1,M2,M3, nexti
Op2 + M(1)M(2)+M(3)
Resop
Memory Required to Encode an Instruction:
1Byte+ 4 x 3 bytes = 13 Bytes
CPU OpCode
Op Code ResAddr
ResAddr Op1Addr
Op1Addr Op2Addr
Op2Addr
CPU OpCode
Op Code Op1Addr
Op1Addr Op2Addr
Op2Addr
CPU OpCode
Op Code Op1Addr
Op1Addr
PC 24
Calculation of Memory Accesses
To fetch Instruction itself To Execute an Instruction
Opcode=1
Op1Addr=1 Op1=1
Total=2 Total=1
push b 6 4 2 1 3
push c
add 3 1 1 0 1
push d
mpy
push e
sub
pop a
39 23 13 5 18
Problems
Compute memory traffic, total memory for encoding and storing code
that implements the expression evaluation for the following code.
Assume that the opcode occupy one byte, address occupy two bytes,
data values also two bytes and 1 byte word length. And also how the
graphs for memory traffic, encoding memory, occupied memory Vs 0-
1-2-3 address machines and deduce interesting observations.
Based on Operation
Data Movement
Data Processing
Control Instructions
Conditional Un Conditional
JNZ, JZ…. Jump
References
Reference Book
Vincent .P. Heuring, Harry F. Jordan “ Computer System
design and Architecture” Pearson, 2nd Edition, 2003