Question of the Day 18-09-2019

Question of the Day
GATE 2017   CS   Question No. 49

Consider a RISC machine where each instruction is exactly 4 bytes long. Conditional and unconditional branch instruction use PC-relative addressing mode with 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 instruction in the program sequence. Consider the following instruction sequence.

Instr. No. Instruction
i   :     add  R2,  R3,  R4
i+1 :     sub  R5,  R6,  R7
i+2 :     cmp  R1,  R9,  R10
i+3 :     beq  R1,  offset
If the target of the branch instruction is i, then the decimal value of the offset is ______