Home » Computer Organization and Architecture » Computer organization and architecture miscellaneous » Question

Computer organization and architecture miscellaneous

Computer Organization and Architecture

  1. 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 Offset is ______.
    1. –16
    2. –6
    3. –13
    4. None of the above
Correct Option: A

In program storage,
Assuming the starting address (EA) is 0000, then

where, I4 is as branch instruction I1 as a target location.
So, PC-relative addressing mode is: (EA) = (PC) + relative value Relative value = (EA) – (PC) = 0000 – 0016 = –16.



Your comments will be displayed only after manual approval.