Flag Registers of 8085 microprocessor

Microprocessor 8085 flag register consists of 5 flip-flop which changes it status according to the result stored in an accumulator. It is also known as status registers. it is connected to the Arithmetic Logic Unit(ALU).

There are 5 flip-flops in the flag register:

    1. Sign(S)

    2. Zero(Z)

    3. Auxiliary Carry(AC)

    4. Parity(P)

    5. Carrey(C)



                                            Fig: Bit position of the flip flops in the flag register

1. Sign (S) : if  D7 of the result is 1 then the sign flag is set otherwise sign flag reset.

The D7 decides the sign of the number. if D7 is 1 the number negative otherwise if 0 it is positive..


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


3. Auxiliary Carry(AC): If any carry goes from D3 to D4 is 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 reset for odd value.


5. Carry(C): If the result stored in an accumulator generated a carry in its final output then it is set otherwise it is reset