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

Computer organization and architecture miscellaneous

Computer Organization and Architecture

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. RRC A #1
    2. NOP; no operation
    3. LRC A #1; left rotate A through carry flag by one bit
    4. ADD A #1
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.



Your comments will be displayed only after manual approval.