All Exams Test series for 1 year @ ₹349 only
Question

Which one of the following types of instructions is useful for initializing registers to assign a constant value?

The correct answer is
Immediate mode instructions

Instruction Addressing Modes for Register Initialization

Initializing registers often involves assigning them a specific starting value, typically a constant. The way an instruction provides this constant value determines its addressing mode.

Understanding Instruction Modes

  • Implied Mode: The operand is inherent in the instruction itself. For example, instructions that operate on the accumulator implicitly use it as the operand. This mode doesn't directly provide a constant for general register initialization.
  • Direct Mode: The instruction includes the memory address where the operand (data) is stored. The processor fetches the data from this specified memory location. This is used to access data in memory, not to specify a constant within the instruction.
  • Immediate Mode: The instruction contains the actual constant value (operand) directly within its binary code. This is the most efficient mode for loading a known constant value into a register. For example, an instruction might look like $MOV R1, #10$, where $10$ is the immediate constant value.
  • Indirect Mode: The instruction contains the memory address that *holds* the address of the operand. The processor must first fetch the address from the specified location and then use that address to find the actual data. This provides flexibility in accessing data but is not suitable for directly embedding a constant.

Selecting the Correct Mode

To assign a constant value directly to a register during initialization, the instruction must contain that constant value itself. Among the given options, Immediate mode instructions are specifically designed for this purpose, as the constant operand is part of the instruction code.

Was this answer helpful?

Important Questions from Addressing Modes

  1. How many bits are required to distinguish between a direct and an indirect address?

  2. Which of the following addressing modes is convenient to handle pointers?

  3. In which one of the following addressing modes, the effective address is equal to the address part of the instruction?
  4. Match the LIST-I with LIST-II
    LIST-ILIST-II
    A. Immediate addressing modeI. MOV A,@R0
    B. Indexed addressing modeII. MOV DPTR,#4521H
    C. Register addressing modeIII. MOVC A,@A+DPTR
    D. Register indirect addressing modeIV. MOV A,R0
    Choose the correct answer from the options given below:
  5. Match each addressing mode in List I with a data element or an element of a data structure (in a high-level language) in List II:
    List IList II
    P. Immediate1. Element of an array
    Q. Indirect2. Pointer
    R. Base with index3. Element of a record
    S. Base with offset/displacement4. Constant
Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App