Professional Documents
Culture Documents
FALLSEM2018-19 CSE2001 TH SJT502 VL2018191005001 Reference Material I 1.3 Machine Instructions V2
FALLSEM2018-19 CSE2001 TH SJT502 VL2018191005001 Reference Material I 1.3 Machine Instructions V2
Organization (CAO)
MACHINE INSTRUCTIONS
Jimmy Mathew
Assistant Professor Senior,
School of Computing Science & Engineering (SCOPE),
VIT University, India
Email: jimmym@vit.ac.in / Office: SJT-313-A08
Reference textbooks
• [1] W. Stallings, “Computer organization and architecture”, Prentice-Hall, 8th
edition, 2009.
• Operation performed
• Number of operand addresses
• Addressing modes
Data Processing
Control Instructions
Conditional Un Conditional
JNZ, JZ…. Jump
• 4 Address Instruction
• 3 Address Instruction
• 2 Address Instruction
• 1 Address Instruction
• 0 Address Instruction
Assumptions
24-bit memory address (3 bytes)
128 instructions (7 bits rounded to 1 byte)
24 Bits / 3 Bytes
4- Address
8
Instruction
24 24 24 24
24 Bits / 3 Bytes
3- Address
8
Instruction
24 24 24
Total=4 Total=3
24 Bits / 3 Bytes
2- Address
8
Instruction
24 24 24
24 Bits / 3 Bytes
1- Address
8
Instruction
24 24
Total=2 Total=1
Zero address
Number of memory access required:
For push and pop:
to fetch an instruction: 2
to fetch an operand value: 1
Total 3
For operations: 1 (to fetch an instruction)
• Direct mode
• Indirect mode
• Register mode
• Displacement mode
• Relative mode
• Indexed mode
• Base mode
• Stack mode
• Implied mode
CAO Chapter 1.3 JMW VIT-U 21
Immediate Addressing Mode
The simplest form of addressing is immediate addressing
Opcode Operand
Advantage:
•This mode can be used to define and use constants
•or set of initials values of variables.
•No memory references
Advantage:
•Limited Operand size
Opcode EA
Advantage: Operand
• Large operand Magnitude
Disadvantage:
•Limited Address Size
The change in the location of the program is associated with
the change in all absolute memory references.
• Numbers
– Signed, unsigned
• Characters
• Logical Data
– Boolean
CAO Chapter 1.3 JMW VIT-U 41
Types of Operands
• Arithmetic
• Logical
• Conversion
• I/O
• System control
• Transfer of control