MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPUTER ARCHITECTURE

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The effective address of the following instruction is MUL 5(R1, R2).
A
5+R1+R2
B
5+(R1*R2)
C
5+[R1]+[R2]
D
5*([R1]+[R2])
Explanation: 

Detailed explanation-1: -The effective address of the following instruction is MUL 5(R1, R2). Explanation: The addressing mode used is base with offset and index.

Detailed explanation-2: -The effective address of the memory operand is calculated by adding the base address in register rs1 to the sign-extended 12-bit offset found in the immediate field. Loads are I-type instructions and stores are S-type instructions.

Detailed explanation-3: -Index addressing mode: In this, effective address of operand is generated by adding a constant value to the contents of a register. Ex. MOV 20(R1), R2.

Detailed explanation-4: -C. D. Explanation: the instruction is using immediate addressing mode hence the value is stored in the location 45 is added.

There is 1 question to complete.