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

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. AC = 0 and CY = 0
    2. AC = 1 and CY = 1
    3. AC = 1 and CY = 0
    4. AC = 0 and CY = 1
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.



Your comments will be displayed only after manual approval.