Instruction Formats



Instructions are classified not only on the basis of reference. Another way to classify instructions is to watch how many address fields are being used by the instruction at once. The instructions having more address fields are more complex to execute than those who have less number of address fields. Following is a list of all such instructions:


Three-Address Instructions

These instructions use three discrete but relevant addresses together. Two of these three are used for operands while the third one is used as destination of the result.

Expression: ( A + B ) * ( C + D )




Two-Address Instructions

These instructions use only two addresses at a time. MOV operation works well in these instructions. Results are stored in registers of CPU.

Expression: ( A + B ) * ( C + D )




One-Address Instructions

These instructions use just one address and all operations are perfrmed in Accumulator. LOAD and STORE operations are used frequently. LOAD operation loads an operand from memory to AC. Similarly STORE operation stores the result from AC to memory.

Expression: ( A + B ) * ( C + D )




Zero-Address Instructions

These instructions are unique since the operations are performed by using a stack. Here AC is of no use. A stack of registers is used to execute instructions. In terms of mathemetical expressions, Infix are first transformed into Postfix and then stacks perform the operations. PUSH and POP are the frequent operations here.

Expression: ( A + B ) * ( C + D )

It's Postfix form is: A B + C D + *