virtualgate's picture

Mchine Instruction, Addressing Modes

Types of Instructions | Data Transfer Instructions | Data Manipulation Instructions | Program Control Instructions

Types of Instructions:
Data Transfer Instructions: 
Data transfer instructions cause transfer of data from one location to another without changing the information content.
The common transfers may be between memory and processor registers, between processor registers and input/output.
Data Manipulation Instructions: Data manipulation instructions perform operations on data and provide the computational capabilities for the computer. There are three types of data manipulation instructions: Arithmetic instructions, Logical and bit manipulation instructions, and Shift instructions.
Program Control Instructions
Program control instructions specify conditions for altering the content of the program counter, while data transfer and manipulation instructions specify conditions for data processing operations. The change in value of a program counter as a result of the execution of a program control instruction causes a break in the sequence of instruction execution.


Contributor's Info

Addressing Modes
Content covered: 

Addressing Modes

More Less
Different types of Addressing Modes | Direct addressing | Indirect addressing | Immediate addressing mode | Register Direct addressing mode | Register Indirect addressing mode | Index addressing mode

Addressing mode in simple words, is a way to access operand(data) from memory and CPU registers.
Different types of Addressing Modes are:

  1. Direct addressing :  Here, address field contains address of operand.
    Single memory access is required .
    Limited address space.
    No extra calculations are required to mainpulate effective address.
    Example : ADD B
  2. Indirect addressing : Use of pointer is required, which points to the address of the operand.
    Larger address space.
    Example : ADD (B) // adds contents of cell pointed to by contents of B to accumulator.
    It may be nested , multilevel.
    Example : ((B))
    slower way of accessing operand as compared to direct addressing mode as multiple memory accesses are required.
    Example: ADD @210 // adds contents of memory location 210 to accumulator.
  3.  Immediate addressing mode : operand is part of instruction.
    Example : ADD #12 // adds 12 to the contents of accumulator.
    Fastest mode.
    No memory access is required.
  4. Register Direct addressing mode : operand is present in register mentioned in addressing field.
    no memory access required.
    fastest way of execution.
    very limited address space.
    Example : ADD R1 // adds contents of Register R1 to the contents of accumulator.
  5. Register Indirect addressing mode : Here, address is present in register.
    operand is in memory cell pointed to by contents of register.
    larger address space.
    one fewer memory access than indirect addressing mode.
    Example : ADD @R1
    can be written as, ACC <- [ACC] + [[R1]]
  6. Index addressing mode : effective address is obtained by adding an index value to the address given in the instruction.
    Used for accessing arrays.
    EA = A + I // here, I is index and A is address.
  7. Relative addressing mode : EA is obtained by adding contents of program counter to the constant value specified in the instruction given.
    It is also known as Displacement addressing mode.
  8. Base register addessing mode : EA = A + BR // BR is base register and A is address.
    Mostly used in segmentation.

Contributor's Info

Created: Edited:

  • This quiz contains 5 questions on the topic Instructions.
  • Lean well before you attempt the quiz
  • You can attempt the quiz unlimited number of times.

Difficulty Level:  basic