Computer Sciences > Gate 2017 Set-1 > RISC Machine
Consider a RISC machine where each instruction is exactly 4 bytes long. Conditional and unconditional branch instructions 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
If the target of the branch instruction is i, then the decimal value of the Offest is __________.
| 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 Offest is __________.
Correct : -16
Total Unique Visitors
Loading......