Table of Contents
ToggleComputer Instructions:
Computer instructions are a set of machine language instructions that a particular processor understands and executes. A computer performs tasks on the basis of the instructions provided.
Instruction Format:
An instruction format defines the different component of an instruction. The main components of an instruction are opcode (which instruction to be executed) and operands (data on which instruction to be executed).
Opcode: The operation code (opcode) represents action that the processor must execute. It tells the processor what basic operations to perform.
Operands: The operand code defines the parameters of the action and depends on the operation. It specifies the locations of the data or the operand on which the operation is to be performed. It can be data or a memory address.

E.g. ADD B // Add the contents of register B to the contents of the accumulator.
MOV C, A // Copy the content of the accumulator into register C.
Types of Instruction:
Three Address Instructions: The general format of a three-address instruction is defined as −
operation source 1, source 2, destination
where A, B, and C are the three variables that are authorized to different areas in the memory. ‘ADD’ is the operation that is implemented on operands. ‘A’ and ‘B’ are the source operands, and ‘C’ is the destination operand.
Therefore, bits are needed to determine the three operands. n bit is needed to determine one operand (one memory address). Likewise, 3n bits are needed to define three operands (three memory addresses). Bits are also needed to determine the ADD operation.
Two Address Instructions: The general format of a two-address instruction is defined as −
operation source, destination
ADD A, B
where A and B are the two variables that are designated to a specific location in the memory. ‘ADD’ is the operation that is implemented on the operands. This instruction adds the content of the variables A and B and saves the result in variable B. Here, ‘A’ is the source operand and ‘B’ is treated as both source and destination operands.
Bits are needed to determine the two operands. n bit is needed to define one operand (one memory address). Likewise, 2n bits are needed to determine two operands (two memory addresses). Bits are also needed to define the ADD operation.
One Address Instruction: The general format of an address instruction is defined as :
operation source
ADD A
where A is the variable that is authorized to a specific location in the memory. ‘ADD’ is the operation that is implemented on operand A. This instruction adds the content of the variable A into the accumulator and saves the result in the accumulator by restoring the content of the accumulator.
Zero Address Instructions:
The locations of the operands in zero-address instructions are represented implicitly. These instructions store operands in a structure known as a pushdown stack.
Instruction Set Completeness:
A set of instructions is said to be complete if the computer includes a sufficient number of instructions in each of the following categories:
- Arithmetic, logical, and shift instructions
- A set of instructions for moving information to and from memory and processor registers.
- Instructions that control the program, together with instructions that check status conditions.
- Input and Output instructions
Arithmetic, logic and shift instructions provide computational capabilities for processing the type of data the user may wish to employ.A huge amount of binary information is stored in the memory unit, but all computations are done in the processor registers. Therefore, one must possess the capability of moving information between these two units. Program control instructions, such as branch instructions, are used to change the sequence in which the program is executed.
Input and Output instructions act as an interface between the computer and the user. Programs and data must be transferred into memory, and the results of computations must be transferred back to the user.
Instruction Cycle:
The Instruction Cycle in computer organization is the basic process a computer’s central processing unit (CPU) follows to execute a single instruction. It is a continuous cycle that allows the CPU to read instructions from memory, understand them, and then perform the required operations.
The instruction cycle is usually divided into four main steps:

- Fetching:The processor fetches the instruction from the memory. The fetched instruction is placed in the Instruction Register. The Program Counter holds the address of the next instruction to be fetched and is incremented after each fetch.
- Decoding: The instruction that is fetched is broken down into parts or decoded. The instruction is translated into commands so that they correspond to those in the CPU’s instruction set. The instruction set architecture of the CPU defines the way in which an instruction is decoded.
- Executing: The decoded instruction or the command is executed. The CPU performs the operation implied by the program instruction. For example, if it is an ADD instruction, addition is performed.
- Storing: CPU writes back the results of execution to the computer’s memory.
Applications of the Instruction Cycle
Program Execution
The instruction cycle is the fundamental process that allows a CPU to run programs, whether it is a simple calculator application or a complex operating system.
Operating Systems
All system-level tasks (like process management, file handling, and input/output operations) rely on the CPU executing instructions through the instruction cycle.
Embedded Systems
Microcontrollers and processors in devices like washing machines, ATMs, printers, and mobile phones use the instruction cycle to execute control programs.
Arithmetic and Logical Operations
The CPU performs calculations (addition, subtraction, multiplication, logical comparisons) by fetching, decoding, and executing instructions in the cycle.
Data Transfer and Communication
Moving data between memory, registers, and I/O devices is done through instructions executed in the instruction cycle.
Automation and Control Systems
Industrial machines, robots, and traffic control systems depend on processors that use instruction cycles to execute control instructions.
Simulation and Gaming
Games and simulation software require rapid execution of millions of instructions, made possible by repeated instruction cycles.
Scientific and Engineering Applications
Complex computations like weather forecasting, space research, or circuit simulations rely on CPUs executing large sets of instructions using the instruction cycle.
