What is an instruction set ? What are the different factors considered for classifying an instructions set ?

What is an instruction set ? What are the different factors considered for classifying an instructions set ?

Ans.  An instruction set can be defined as a group of instructions that a processor can execute to perform different operations.

The instruction set can be classified in the basis of complexity and the number of instructions used.

The instruction set can be classified as follows-

  1. Complex Instruction Set – The complex instruction set refers to the set of instruction that includes very complex and large number of instructions. The number of instructions in this set varies from 100 to 250. The instructions in this set are mostly memory-based instruction, which involve frequent references to the memory. The complex instruction uses a number of addressing modes because of the frequent references to registers as well as memory. The instructions in this instruction set has variable length instruction format, which is not limited to only 32-bits. The execution of instructions takes a lot of time because the instructions are memory-based and accessing the memory is a time consuming process as compared to accessing the registers.

The computer, which uses complex instruction set, is known as complex instruction set computer (CISC). The instruction set CISC has a large number of instructions, and for each instruction type, the computer needs a separate circuitry, which makes the CPU design more complicated.

The advantages of CISC are as follows-

  1. There is one need to invent an instruction set for each new design. A new processor can use the instruction set of its predecessor.
  2. A program written in CISC needs less memory space, as the code is confined to less number of instructions.
  3. CISC makes the job of a complier easier by facilitating the implementation of high-level language constructs.

The disadvantages of CISC are as follows-

  1. Many CISC instructions are not frequently used.
  2. The inheritance of old instructions into new processors increases the complexity.
  3. CISC commands are translated into a large number of lines of microcode, which makes the CPU processing slower.
  4. CISC system have a complex hardware, so they need more time for designing.

2. Reduced Instruction Set – The reduced instruction set refers to a set of instructions that include very few instructions ranging from 0 to 100. It comprises of only those instructions, that are frequently used by the processor for the execution of a program. The instructions used in this set are mostly register-based, which involve frequent references to the registers. The memory-based instructions, which involve frequent references to the memory locations, are very few in this instruction set. The memory-based instructions include only load and store instructions. The instructions in this instruction set have fixed length instruction format of 32 bits.

The computer, which uses reduced instruction set, is called reduced instruction set computer (RISC). Since the instruction set of RISC has very few instructions, the design of hardware circuitry become easier and also the speed of processing increases. The speed of RISC processors is measured in millions of instructions per second 9MIPS).

The RISC processors are always preferred over the CISC processors because of their compact size and small instruction set. The other advantages of the RISC processors over the CISC processors are as follows-

  1. In RISC processors, the instructions are executed by decoding, whereas in CISC processors, the instructions are executed by first translating them into equivalent microcode instructions. This conversion of instructions into microcode consumes a lot of space in the memory, thereby reducing the speed of execution.
  2. The RISC processors execute instructions in a single clock cycle, while the CISC processors need multiple clock cycles for the execution of an instruction.
  3. The hardware of the RISC processors is very simple and can be designed easily, as compared to the hardware of the CISC processors that is very complex, difficult to design and large in size.

The only drawback of RISC, in comparison to CISC, is that the number off instructions needed to perform an operation is comparatively high.

Share this post