Skip to content
TheCScience
TheCScience

Everything About Education

  • Pages
    • About US
    • Contact US
    • Privacy Policy
    • DMCA
  • Human values
  • NCERT SOLUTIONS
    • Class 12
    • Class 11
  • HackerRank solutions
    • HackerRank Algorithms Problems Solutions
    • HackerRank C solutions
    • HackerRank C++ problems solutions
    • HackerRank Java problems solutions
    • HackerRank Python problems solutions
TheCScience
TheCScience

Everything About Education

Instructions Types | Computer Architecture

YASH PAL, October 14, 2025October 14, 2025

Instruction Types in Computer Architecture – Instructions from an instruction set can be grouped together, on the basis of the operations they perform, the instructions can broadly be classified as follows

Instructions Types

  1. Data transfer instructions
  2. Data manipulation instructions
  3. Program control instructions

Data Transfer Instructions

This group of instructions copies data from source location to destination location without changing the contents of the source location. These instructions typically perform one of the following transfers.

  1. Load data from memory to processor: A CPU or processor usually contains several registers to store data that it is using. These instructions copy data from memory to the registers which are internal to the processor.
  2. Store data from processor to memory: This is similar to loading data, except data flow is in opposite direction from processor register to memory.
  3. Move data within the processor: These instructions copy data from one processor register to another.
  4. Input data to processor: These instructions obtain the data from an external device and copy it to the processor register. Example of such device is key board of a computer system.
  5. Output data from processor: The processor copies data from one of its registers to an output device such as the digital display of a computer system.

In addition to these types of data transfer instructions, some instructions contain specialized data transfer. These instructions may transfer a block of data from one area of memory to another, or between and an input/output device.

Note: Data transfer instruction do not change the flag contents while moving from source location to destination location in a computer system

Data Manipulation Instructions

Unlike data transfer instructions, data manipulation instructions do modify their data contents. They typically perform the arithmetic, logic, string and shift operations using one or two operands and finally store the result. The data manipulation instructions define the computational capability of the computer.

(a) Arithmetic Instructions: The instructions that perform arithmetic operations like addition, subtraction, multiplication, division etc. fall into this category. Increment (add one) and decrement (subtract one) are also come in this category. A special class of arithmetic instructions are floating point instructions. Generally arithmetic instructions operate on integer values.

Floating point operations perform the same operations, but on floating point data. The number of bits in any register is of finite length and therefore the results of arithmetic operations are of finite precision. Some computers provide hardware double-precision operations where the length of cach operand is taken to be the length of two memory words.

Execution of arithmetic instructions generally affect the processor status flag register. The flag register status, therefore can be used to check the particular condition like a carry, or a borrow, or an overflow, or an underflow.

(b) Logical Instructions: Logical instructions perform binary operations on strings of bits stored in registers. These instructions can be used to set, clear and export specific groups of bits and perform many other operations. The most common logic operations are ANDing, ORing, X-ORing and complementing the data.

These operations are performed in a bit wise manner. Therefore, these instructions are also known as bit manipulation instructions, For example, consider an instruction that ANDs two 8-bit values, A and B. They consist of the bits A7, A6, A5, A4, A3, A2, A1, A0 and B7, B6, B5, B4, B3, B2, B1, B0, respectively The AND operation sets the result to (A7ΛB7), (Α6ΛΒ6), (A5ΛB5). (A4ΛB4), (A3ΛB3). (A2ΛB2), (A1ΛB1) and (A0ΛB0). The other logic operations works in the similar manner.

(c) Character and String Processing Instructions: Character strings are useful for processing textual information. However, Boolean shift instructions can be used to manipulate strings but most of the computer systems use separate character and string processing instructions. These instructions can perform the comparison of two strings from the starting address to the ending address. Generally compare instruction returns the character number that mismatches first in string.

(d) Shift Instructions: Shift instructions, as their name implies, shift the bits of a data value. For example right shift of a value moves each bit one position to the right, the least significant bit may be lost or shifted around to the most significant position, depending on the type of right shift. There are three types of shifts.

  1. Logical shift
  2. Circular shift
  3. Arithmetic shift

All the above types of shift are discussed in previous chapter.

Program Control Instructions

In general, instructions are stored in successive memory location and executed in the same sequence. One of the processor register, program counter (PC), is responsible for sequencing of the instruction execution. Each time an instruction is fetched from memory, the program counter is incremented so that it contains the address of the next instruction in sequence.

On the other hand, a program control instruction, when executed, may change the address in program counter and cause the flow of control to be altered. This makes a break in the sequence of instruction execution. This is a very important feature, as it provides control over the flow of program execution and a capability for branching to different program segments. Some typical program control instructions are branch, jump (conditional and unconditional), skip, call and return ete.

(a) Branch and Jump Instructions: These instructions are commonly used to go to another part of the program These jumps can be unconditional (always performed) or conditional (performed only if condition is met). If unconditional jump or branch instruction is executed, the program counter is loaded with the branch address and the next instruction is taken from this address without checking any condition.

Whereas, if conditional jump or branch instruction is executed, program control branches to the specified address if condition is met. If the condition is not met, the program counter is not changed and the next instruction is taken from the next location in sequence.

(b) Subroutine Instructions: These instructions include call and return instructions. These are used for subroutine linkage. During the program execution, subroutine may be called several times. Whenever a subroutine is called a branch operation is performed. Once the subroutine is executed completely, the program control returns back to the calling location. Therefore, it is required to store the returning address in a temporary location like stack.

(c) Interrupt Instructions: Interrupt is defined as the signal which breaks the sequencing of the currently running program and starts executing other instructions. Whenever an interrupt request occurs the program control transfers from a currently running program to another service routine, the control returns back to original program after execution of service routine. The address of service routine is predefined to the processor Interrupts may be categorized as follows:

  1. External Interrupts
  2. Internal Interrupts
  3. Software Interrupts
  4. Hardware Interrupts

External interrupts are generated by external devices. These external devices can be a timer, a switch, or any other input/output device. The external interrupt may be generated, if power fails or drops below a safe operating point.

Internal interrupts arise from illegal or erroneous use of an instruction or data. These are also known as exceptions or traps. These are triggered when valid instructions perform invalid operation, for example divide by zero. The difference between external and internal interrupts is that the external interrupt is generated by an external device whereas the internal interrupt is generated by processor itself which is initiated by some exceptional condition.

An assembly language instruction set may include specific instructions to generate interrupts, these are called software interrupts. A software interrupt is initiated by executing an instruction. The most common use of this facility is associated with the supervisor call instruction whereby processor changes its state from user mode to supervisor mode.

When the processor executes a program that is the part of the operating system, it is said to be in supervisor mode. The processor is normally operates in user mode when executing user programs. Hardware interrupts are associated with the system to handle machine errors. Processor has a register which stores the machine errors.

(D) Machine Control Instructions: Machine control instructions are used to control the processor operations. For example halt instruction causes a processor to stop executing instruction, such as at the end of a program. No operation instruction allows the processor to perform nothing.

    Computer System Architecture engineering subjects Computer System Architectureengineering subjects

    Post navigation

    Previous post
    Next post
    ©2025 TheCScience | WordPress Theme by SuperbThemes