Machine  Instruction                                                                                                                                   Print this page
<< Previous |  First Last |  Next >>       

Number of Addresses  

What is the maximum number of addresses one might need in an instruction? Most of the arithmantic and logic operations are either unary (one operand) or binary (two operands). Thus we need a maximum of two addresses to reference operands. The result of an operation must be stored, suggesting a third address. Finally after completion of an instruction, the next instruction must be fetched, and its address is needed.

This reasoning suggests that an instruction may require to contain four address references: two operands, one result, and the address of the next instruction. In practice, four address instructions are rare. Most instructions have one, two or three operands addresses, with the address of the next instruction being implicit (obtained from the program counter).

<< Previous |  First |  Last |  Next >>