Thursday, 5 May 2016

Flag register

Flag register:-It contains 5 single bit flags and three unused bits which changes its status according to the result stored in an accumulator. It is also known as status registers.
        There are five flip-flops in the flag register are as follows:
                                1.Sign flag(S)
                                2.zero flag(z)
                                3.Auxiliary carry flag(AC)
                                4.Parity flag(P)
                                5.Carry flag(C)

Bit position of flags in flag register
1.Sign (S)- If D7 of the result is 1 then sign flag is set otherwise reset. As we know that a number on the D7 always decides the sign of the number.
if D7 is 1: the number is negative.
if D7 is 0: the number is positive.

2.Zero (Z)-If the result stored in an accumulator is zero then this flip flop is set otherwise it is reset.

3.Auxiliary carry(AC)-If any carry goes from D3 to D4 in the output then it is set otherwise it is reset.

4.Parity (P)If the no of 1's is even in the output stored in the accumulator then it is set otherwise it is reset for the odd.

5.Carry Flag (CY)- If the result stored in an accumulator generates a carry in its final output then it is set otherwise it is reset.

3 comments:

  1. Please show 8085 programs with output and flag register .

    ReplyDelete
    Replies
    1. if you can then check my videos on youtube https://www.youtube.com/watch?v=ORx6Ow7HqYc

      Delete
  2. Please show 8085 programs with output and flag register .

    ReplyDelete