Professional Documents
Culture Documents
CAO Unit 2
CAO Unit 2
CAO Unit 2
Unit 2
M S . M AY U R I K U L K A R N I
Content
➢Characteristics
➢Types of operands
➢Types of Operations
➢Assembly Language
➢Addressing modes
➢Instruction Format
➢Types of Instruction
➢Instruction Execution
Instruction Set ➢Machine state & processor status
➢Structure of program
➢Introduction to RISC & CISC architecture
Machine Instruction Characteristics
The operation of processor is determined by the instructions it executes, referred to as machine
instruction or computer instructions.
The collection of different instructions that the processor can execute is referred to as the
processor’s instruction set.
Characteristics
oElements of Machine Instruction
oInstruction Representation
oInstruction types
oNumber of Addresses
oInstruction set design
Elements of Machine Instruction
Each instruction contain the information required by the processor for execution.
oOperation code
oSource operand reference
oResult operand reference
oNext instruction reference
oData movement
I/O instruction
oControl
Test & branch instruction
Number of Addresses
➢Three address instruction format are not common because they require a relatively long
instruction format to hold the three address references.
➢The two address format reduces the space requirement.
➢One address instruction has second address must be implicit. This was common in earlier
machines with implied address being a processor register known as accumulator. Accumulator
contains one of the operands & is used to store the result.
➢Zero-address instruction are applicable to a special memory organization called stack.
Number of Addresses
➢Traditional of describing processor architecture is in terms of the number of addresses
contained in each instruction.
➢ This dimension has become less significant with the increasing complexity of processor design.
➢Arithmetic & logical instruction requires more operands. Virtually all arithmetic & logical
operands are either unary or binary.
TYPES OF OPERATIONS
■ Data transfer
■ Arithmetic
■ Logical
■ Conversion
■ I/O
■ System control
■ Transfer of control
Common Instruction Set Operations
Type Operation Description
Name
Data transfer Move Transfer word or block from source to destination
Store Transfer word from processor to memory Load (fetch)
Transfer word from memory to processor
Exchange Swap contents of source and destination Clear (reset)
Transfer word of 0s to destination
Set Transfer word of 1s to destination
Push Transfer word from source to top of stack
Pop Transfer word from top of stack to destination
Common Instruction Set Operations
Type Operation Name Description
Arithmetic Add Add Compute sum of two operands
Subtract Compute difference of two operands
Multiply Compute product of two operands
Divide Compute quotient of two operands
Absolute Replace operand by its absolute value
Negate Change sign of operand
Increment Add 1 to operand
Decrement Subtract 1 from operand
Common Instruction Set Operations
Type Operation Name Description