CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Consider a three word machine instruction

ADD A[R0],@B

The first operand (destination) "A[R0]" uses indexed addressing mode with R0 as the index register. The second operand (source) "@B" uses indirect addressing mode. A and B are memory addresses residing at the second and the third words, respectively. The first word of the instruction specifies the opcode, the index register designation and the source and destination addressing modes. During execution of ADD instruction, the two operands are added and stored in the destination (first operand).

The number of memory cycles needed during the execution cycle of the instruction is

A
6
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
4
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
3
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
5
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is A 6
ADD A[R0],@B

A[R0] uses indexed addressing mode as follow such that R0 as the index register

Regs[R3] Regs[R3]+Mem[Regs[B]+Regs[R0]] ...(i)

And @B uses indirect as follows

ADD A[R0],@B

Regs[R0] Regs[R0]+Mem[Mem[B]] ...(ii)

So the first instruction needed 3 memory cycles and the second needed 2 and one memory cycle is needed for writing the result into the memory.

So total 6 memory cycles are needed to execute

ADD A[R0],@B

flag
Suggest Corrections
thumbs-up
0
similar_icon
Similar questions
View More
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Controlling
BUSINESS STUDIES
Watch in App
Join BYJU'S Learning Program
CrossIcon