Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Describe the types of instructions on the basis of address fields used in the instruction with example.

Four types of instructions are available on the basis of referenced address fields :
Now, Let us evaluate the following arithmetic expression, using all instruction types.
X = (A + B) * (C + D)

  1. Three address instruction : Computers with three address instruction formats can use each address fields to specify either a
    processor register or a memory operand. The program in assembly language to evaluate arithmetic expression is shown as :

2.Two address instruction : In this format each address field can specify either a processor register or a memory word. The assembly
language program to evaluate arithmetic expression is as follows :

3. One address instruction : One address instruction uses an implied accumulator (AC) register for all data manipulation. The program is as follows :

4. Zero address instruction : A stack organized computer does not use an address field for the instructions ADD and MUL. The PUSH and POP instructions need an address field to specify the operand that communicates with the stack. The program is as follows :

where TOS is TOP of the stack

Leave a Comment