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

Consider a machine where each instruction is exactly 'w' bytes long. All types of branching instructions are using PC-relative addressing mode with relative address(offset) specified in bytes to the target location of the branch instruction. Further, the offset is always with respect to the address of the next instructions in the program sequence. Consider a program (instruction sequence) with n instruction numbered I0 to In2. Last instruction In1 is the branch instruction and its target is first instruction I0. The value of offset for branch instruction is

Open in App
Solution

option(d)

Instruction sequence in memory


While executing In1 instruction (branch instruction) value of PC =nw
Traget address=0=PC+offset
offset=nw

flag
Suggest Corrections
thumbs-up
0
similar_icon
Similar questions
View More
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Addressing Modes 3
OTHER
Watch in App
Join BYJU'S Learning Program
CrossIcon