Computer organization and architecture miscellaneous


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. View Hint View Answer Discuss in Forum

    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.

    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.


  1. Consider the C struct, defined below :
    struct data {
    int marks [100];
    char grade;
    int cnumber; };
    struct, data student;
    The base address of student is available in register Rl. The field student grade can be accessed efficiently using









  1. View Hint View Answer Discuss in Forum

    Since direct access is possible with only index addressing mode. So, option (d) is correct.

    Correct Option: D

    Since direct access is possible with only index addressing mode. So, option (d) is correct.