Instruction Types

As we know a computer uses different kinds of instructions for different kinds of tasks, a general set of three discrete types of instructions are used in a modern computer. hese are:

Memory Reference Instructions

A Memory Reference Instruction is the one which refers to a significant memory location for it's operands. For ex. ADD operation needs a memory operand to be ADDed with the contents of AC. The most fundamental thing in these instructions is the wide use of Opcode as possible operation identifier. Since we have 3 bits as opcode, we may have a total of 8 possible operation, out of which only 7(000,001,010,011,100,101,110) are defined as Memory Reference Instructions. Consider the following table for a detailed description of all memory reference operations:

I/O Reference Instructions

I/O reference instructions are those that refer to some kind of input or output operation. An input operation denotes the transfer of input data from input device to AC whereas output operation denotes the transfer of output data from AC to output device. In all this I/O operation, following are the two most important artifacts:

  1. The combined condition for execution of I/O reference instructions is: D7 I T3
  2. All possible operations here are just 6. this is because bits in IR(6-11) only are used as to denote the I/O operation.

Since I/O reference instructions introduce some kind of hardware interaction, the CPU isn't frequent with this kind of instructions. Instead it regularly executes memory reference instructions for programs stored in the memory. Whenever a device interaction is needed, a separate operation called INTERRUPT CYCLE is performed.

Register Reference Instructions

These instructions are different from memory and I/O reference instructions. The biggest difference is in all possible operations. Since a register reference instruction is characterized by 111 as Opcode value along with 0 as Mode bit, the Opcode here is consumed just in identification of instruction type. To compensate, the bits in Address part are used as possible operation identifiers. Consider the following artifacts:

  1. The combined condition for execution of I/O reference instructions is: D7 I' T3
  2. All possible operations here are just 12 since bits in IR(0-11) are used as to denote the Register operation.

Register reference instructions are even more frequent for CPUs rather than I/O reference instructions. This is in contrast that most of the CPU operations are performed within registers. Hence there are many situations when we need to transfer, complement, shift, increment or decrement the contents of registers. All these operations are performed using register reference instructions.