Here, we are going to learn about instructions in computer organization.

Computer instructions are a set of machine language instructions that a certain processor understands and executes. A computer executes tasks based on the commands it receives. An instruction is made up of groups that make up a field.

Following are some of the fields:

The Opcode (Operation code) field generally specifies the operation that the processor has to carry out.

The operand’s location, for example, register or memory location, is stored in the Address field.

The Mode field determines where the operand is located.

Types of Instructions in Computer Organization :

Memory Address —

Memory address is like an operand in these instructions. The accumulator is always the other operand. For direct and indirect addressing, specifies a 12-bit address, a 3-bit opcode (other than 111), and a 1-bit addressing mode.

Register Reference —

Rather than using memory addresses, these instructions operate on registers. The IR(14–12) is 111, indicating that it is not a memory reference, and the IR(15) is 0 (indicating that it is not an input/output instruction). The remaining 12 bits are there to determine register operation.

Input/ Output — 

These instructions basically help to communicate between the computer and the outside world. The IR(14–12) is 111 (which distinguishes it from a memory reference) and the IR(15) is 1. (differentiates it from register reference instructions). The remaining 12 bits are there to specify I/O operations.

Completeness of the instruction set :

If the computer has a sufficient number of instructions in each of the following categories, then the set of instructions is considered to be complete.

Instructions in arithmetic, logic, and shift.

A sequence of instructions basically used to transfer data between memory and CPU registers.

Instructions that operate the program as well as instructions that examine the status of the program.

Instructions for both input and output.

Instruction Cycle in Computer Organization :

A program stored in a computer’s memory unit is made up of a series of instructions. The CPU generally goes through a cycle for each instruction before executing it.

In a basic computer, each instruction cycle has the following phases:

1. Retrieve the command from memory.

2. Take the instruction and decode it.

3. From memory, read the effective address.

4. Put the instruction into action.