Instruction and Instruction Code

We all know that without our instructions a computer can do nothing. Hence we need to instruct the computer to perform a specific operation.

  1. The collection of bits that instruct the computer to perform a specific operation is called an instruction code.
  2. Operation part is the most basic part of an instruction code. The operation code of an instruction is a group of bits that define such operations as add, subtract, multiply, shift and complement.
  3. The total number of operations available in the computer determines the number of bits required for the operation code of an instruction. The operation code must consist of at least n bits for a given 2n (or less) distinct operations.
  4. An 'operation' is a binary code, that instruct the computer to perform a specific operation. The control unit gets the instruction from memory and interprets the operation code bits. It then issues a sequence of control signals to initiate micro-operations in internal computer registers. For every operation code, the control issues a sequence of micro-operations required for the hardware implementation of the specified operation.

This operation should be performed on some data stored in processor registers or on the data stored in the memory. Hence an instruction code must specify both the operation and the registers or the memory words where the operands are to be found, as well as the registers or the memory word where the operands be stored.

Memory words can be specified in instruction codes by their address. Processor registers can be specified by assigning to the instruction another binary code of K bits that specifies one of 2K registers. There are many variations for arranging the binary code of instructions. Each computer has its own particular instruction code format called its Instruction Set.