Computer organization and architecture miscellaneous


Computer organization and architecture miscellaneous

Computer Organization and Architecture

  1. What are the sates of the Auxiliary Carry (AC) and carry Flag (CY) after executing the following 8085 program?
    MVI H, 5DH
    MVI L, 6BH
    MOV A, H
    ADD L









  1. View Hint View Answer Discuss in Forum

    The MVI instruction loads 5DH in H register and 6BH in L register respectively. The MOV instruction moves the contents of the source to the destination i.e., the contents of register H are copied in accumulator A. And the ADD instruction adds the contents of destination register i.e., L to the accumulator A. Thus, the program performs the above functions and adds 5DH and 6BH to obtain the result as 0101 1101 (5DH) + 0110 1011 (6BH) = 1100 1000 The result 1100 1000 is stored in the flags as

    Thus, the value stored in AC and CY is 1 and 0 respectively as the value of P flag is passed to AC as a carry.

    Correct Option: C

    The MVI instruction loads 5DH in H register and 6BH in L register respectively. The MOV instruction moves the contents of the source to the destination i.e., the contents of register H are copied in accumulator A. And the ADD instruction adds the contents of destination register i.e., L to the accumulator A. Thus, the program performs the above functions and adds 5DH and 6BH to obtain the result as 0101 1101 (5DH) + 0110 1011 (6BH) = 1100 1000 The result 1100 1000 is stored in the flags as

    Thus, the value stored in AC and CY is 1 and 0 respectively as the value of P flag is passed to AC as a carry.


Direction: Consider the following assembly language program for a hypothetical processor. A, B and C are 8 registers. The meanings of various instructions are shown as comments.

  1. Which of the following instructions when inserted at location X will ensure that the value of register A after program execution is the same as its initial value?









  1. View Hint View Answer Discuss in Forum

    In the end of program execution to check whether both initial and final value of register A is A0, we need to right rotate register A through carry by one bit. Hence (a) is correct option.

    Correct Option: A

    In the end of program execution to check whether both initial and final value of register A is A0, we need to right rotate register A through carry by one bit. Hence (a) is correct option.



  1. If the initial value of register A is A0, the value of register B after the program execution will be









  1. View Hint View Answer Discuss in Forum

    Here value of B incremented by 1 only if carry flag is 1, carry is filled using right rotation, so B will store the no. of is in A0. Hence (b) is correct option.

    Correct Option: B

    Here value of B incremented by 1 only if carry flag is 1, carry is filled using right rotation, so B will store the no. of is in A0. Hence (b) is correct option.


  1. For a pipelined CPU with a single ALU, consider the following situations
    1. The j + 1st instruction uses the result of the j th instruction as an operand.
    2. The execution of a conditional jump instruction.
    3. The j th and (j + 1) st instrution require the ALU at the same time. Which of the above can cause a hazard?









  1. View Hint View Answer Discuss in Forum

    Case 1 is here of data dependency, this can’t be safe with single ALU so read after write.
    Case 2 Conditional jumps are always hazardous as they create conditional dependency in pipeline.
    Case 3 This is write after read problem or concurrency dependency so hazardous. All the three are hazardous. Hence (d) is correct option.

    Correct Option: D

    Case 1 is here of data dependency, this can’t be safe with single ALU so read after write.
    Case 2 Conditional jumps are always hazardous as they create conditional dependency in pipeline.
    Case 3 This is write after read problem or concurrency dependency so hazardous. All the three are hazardous. Hence (d) is correct option.



  1. Which of the following addressing modes are suitable for program relocation at run time?
    1. Absolute addressing
    2. Relative addressing
    3. Based addressing
    4. Indirect addressing









  1. View Hint View Answer Discuss in Forum

    Program relocation at run time transfers complete block to some memory locations. Relocation is the process of assigning load addresses to various parts of a program and adjusting the code and data in the program to reflect the assigned addresses This require base address and block should be relatively addressed through this base address. This require both based addressing and relative addressing mode. Hence (c) is correct option.

    Correct Option: C

    Program relocation at run time transfers complete block to some memory locations. Relocation is the process of assigning load addresses to various parts of a program and adjusting the code and data in the program to reflect the assigned addresses This require base address and block should be relatively addressed through this base address. This require both based addressing and relative addressing mode. Hence (c) is correct option.