Instructions

Instructions

Published by: Sujan

Published date: 18 Jun 2021

Instructions - photo

Instructions

In a computer program, instructions are those that describe steps to be performed out a computational task. The size or lengths of instructions vary widely. They may be from 4-bits to bytes for longer instructions. Each instruction is a set of 0s and 1s.

Instruction Format

Instruction is designed to perform a task accomplishes. It is a simple layout of instructions to perform tasks inside the computer. The common fields of instructions are – Operation (OP) code and Operand code. The remainder differs from one computer type to the other. The operation code represents the action that processors execute. The OP code part of the instruction contains 3 bits. The operand code defines the parameters of the action and also depends on the operation. It uses the remaining 13 bits. But the number of bits in an instruction varies according to the type of data in a computer.

{PHOTO}

Fig: Instruction Format

Instruction Set

An instruction set is the set of instructions. It is a part of computer architecture. It specifies the operations, operands, and sequence for the processing of instructions. They are the set of all basic operations for a processor to complete. All programs do communicate with the processor using these instruction sets. These involve a series of logical operations that perform a complete task. The processor understands the coded instructions.

Instruction Cycle

The instruction cycle is a cycle in which a computer processor executes an instruction. It has four steps:

  •  Fetching: This means to fetch instruction from the memory of the computer which is then placed in the instruction Register.
  •  Decoding: The fetched instruction is then decoded and translated into commands in correspond to the CPU’s instruction set.
  •  Execution: Now, there is execution of decoded instruction. If there is an ADD instruction, then it is an addition operation.
  •  Storing: Then, computer memory stores the program.

{PHOTO}