Format of Instruction

In this article, we will discuss the format of instructions, types of instructions format, examples of the format of instructions and parts of instruction format.

The instructions provided to computers help the computer perform a task. The computers comprise instructions in groups called fields. Each field has different information and different significance based on which the CPU decides what to perform. The group of bits is used to perform a particular operation on the data. These operations are called instruction code or instruction format. The data on which operations are performed are stored in the computer. Different computers have their own set of instructions. The CPU or processor takes all these instructions from memory and decodes the bits to carry out the instructions.

The layout of bits of instruction is called an instruction format. The instruction format contains opcode (the instructions to be executed), operand (the data on which the instructions are to be executed), and addressing mode.

Format Of Instruction

The set of instructions that manages the operation codes is called the format of instruction. The design of bits in instruction is supported by the format of instruction. The length of instruction is generally preserved in multiples of character, which is 8bits. The instruction format determines the behaviour and complexity of instruction. Depending upon the number of addresses, the format of instruction is of variable length.

 Types of instruction format include:

  •  Zero(0) Address Instruction format

  • One(1) Address Instruction format

  • Two(2) Address Instruction format

  • Three(3) Address Instruction format

Types Of Instruction Format

Types of instruction formats are :

1. Zero(0) Address Instruction format 

  • The instruction format in which there is no address field is called zero address instruction

  • In zero address instruction format, stacks are used

  • In zero order instruction format, there is no operand

2. One(1) Address Instruction format 

  • The instruction format in which the instruction uses only one address field is called the one address instruction format

  • In this type of instruction format, one operand is in the accumulator and the other is in the memory location

  • It has only one operand

  • It has two special instructions LOAD and STORE

3. Two(2) Address Instruction format 

  • The instruction format in which the instruction uses only two address fields is called the two address instruction format

  • This type of instruction format is the most commonly used instruction format

  • As in one address instruction format, the result is stored in the accumulator only, but in two addresses instruction format the result can be stored in different locations

  • This type of instruction format has two operands

  • It requires shorter assembly language instructions

4. Three(3) Address Instruction format 

  • The instruction format in which the instruction uses the three address fields is called the three address instruction format

  • It has three operands

  • It requires shorter assembly language instructions

  • It requires more bits

Example Of format Of Instruction

1. Zero Address Instruction examples

  • Assembly language instruction – PUSH A, PUSH B etc.

  • Stack transfer operation – TOS <- A, TOS <- B etc.

2. One Address Instruction examples

  • Assembly language instruction – LOAD C, ADD B, STORE T etc.

  • Operation Register instruction – AC <- M[T], AC <- M[C] etc.

3. Two Address Instruction examples 

  • Assembly language instruction – MOV R1, A; ADD R1, B etc.

  • Operation Register instruction – R1 <- M[A], R2 <- M[C] etc.

  1. Three Address Instruction examples

  • Assembly language instruction – ADD R1, A, B etc.

  •  Operation Register instruction – R1 <- M[A] + M[B] etc.

Parts Of Instruction Format

The parts of the instruction format are:

1. Addressing Mode 

  • The data is represented in the instruction format with the help of addressing mode

  • The addressing mode is the first part of the instruction format

  • The data can either be stored in the memory of a computer or it can be located in the register of the CPU

2. Operation Code( OPCODE)

  • The operation code gives instructions to the processor to perform the specific Operation

  • The operation code is the second part of the instruction format

3. OPERAND

  • It is the part of the instruction format that specifies the data or the address of the data

  • Depending upon the processor of the computer the instruction format contains zero to three operands

Conclusion 

A standard machine which can be directly decoded and executed by the CPU is called instruction format. It is a sequence of bits in a machine instruction that defines the layout of the instruction. The format of instruction provides specific information to the CPU regarding the information to be performed. The parts of the format of instruction are addressing mode, operation code and operand. The characteristic of a good format of instruction is that all the components of instruction should be present. The group of Instructions is called the instruction set.

Also check:

faq

Frequently asked questions

Get answers to the most common queries related to the NTA Examination Preparation.

Define the format of instruction?

Ans. The group of bits is used to perform a particular operation on the data. These operations are called instructio...Read full

Write about zero address Instruction format?

Ans. The instruction format in which there is no address field is called zero ...Read full

Write two address instruction examples?

Ans. Assembly language instruction – MOV R1, A; ADD R1,B etc. ...Read full

Define Addressing Mode?

Ans. The data is represented in the instruction format with the help of addres...Read full

Define Operand?

Ans. It is the part of the instruction format that specifies the data or the a...Read full

Write about three address instruction format?

Ans. The instruction format in which the instruction uses the three address fi...Read full