Flag Register in 8086
Microprocessor
Presented by
Khairnar sayali
What is a flag register in
8086 microprocessor?
 8086 has 16-bit flag dividing two parts:
 16-bit flag :- 1) 9 flag = i) status flag ii) control flag
2) 6 flag=unused
 Flag register is a 16-bit register, but there are only 9 flags avalaiable in the
8086 microprocessor.
Flag register of 8086
Types of flags of flag register in 8086
microprocessor
 flags:-There are two types of flags of flag register in 8086 microprocessor:
1) status flags 2) control flags
 Status flags
In the flag register, 6 out of 9 flags are used as status flags. When the microprocessor performs
an arithmetic or logical operation in ALU, then depending upon the status of the result, the
microprocessor will store corresponding status bits 0 or 1 in status flags. The status flags are,
 Carry flag (CF)
 Parity flag (PF)
 Auxiliary carry flag (AF)
 Zero flag (ZF)
 Sign flag (SF), and
 Overflow flag (OF).
CF:
It stands for carry flag.
If CF = 1 ; it means carry is generated from the MSB.
If CF = 0 ; no carry is generated out of MSB.
Example :
PF:
it stands for parity flag.
If PF =1 ; it means it is even parity in the result (there are even numbers of 1’s).
If PF =0; it means it is odd parity.
In example 1, there are 4 ones’ which is even , in the second example there are 5 ones’ which is odd in count.
 AF
AF stands for auxiliary flag. As 8-bits form a byte, similarly 4 bits form a nibble. So in 16 bit operations there are 4
nibbles.
If AF = 1 ; there is a carry out from lower nibble.
If AF = 0 ;no carry out of lower nibble.
ZF:
This is zero flag. Whenever the output is 0 this flag is 1.
If ZF = 1 ; output is zero.
If ZF = 0 ; output is non zero.
OF:
OF stands for overflow flag.
The are two types of numbers
1.Signed
2.Unsigned

Flag Register in 8086.pptx microprocessor 8085

  • 1.
    Flag Register in8086 Microprocessor Presented by Khairnar sayali
  • 2.
    What is aflag register in 8086 microprocessor?  8086 has 16-bit flag dividing two parts:  16-bit flag :- 1) 9 flag = i) status flag ii) control flag 2) 6 flag=unused  Flag register is a 16-bit register, but there are only 9 flags avalaiable in the 8086 microprocessor.
  • 3.
  • 4.
    Types of flagsof flag register in 8086 microprocessor  flags:-There are two types of flags of flag register in 8086 microprocessor: 1) status flags 2) control flags  Status flags In the flag register, 6 out of 9 flags are used as status flags. When the microprocessor performs an arithmetic or logical operation in ALU, then depending upon the status of the result, the microprocessor will store corresponding status bits 0 or 1 in status flags. The status flags are,  Carry flag (CF)  Parity flag (PF)  Auxiliary carry flag (AF)  Zero flag (ZF)  Sign flag (SF), and  Overflow flag (OF).
  • 5.
    CF: It stands forcarry flag. If CF = 1 ; it means carry is generated from the MSB. If CF = 0 ; no carry is generated out of MSB. Example : PF: it stands for parity flag. If PF =1 ; it means it is even parity in the result (there are even numbers of 1’s). If PF =0; it means it is odd parity. In example 1, there are 4 ones’ which is even , in the second example there are 5 ones’ which is odd in count.
  • 6.
     AF AF standsfor auxiliary flag. As 8-bits form a byte, similarly 4 bits form a nibble. So in 16 bit operations there are 4 nibbles. If AF = 1 ; there is a carry out from lower nibble. If AF = 0 ;no carry out of lower nibble. ZF: This is zero flag. Whenever the output is 0 this flag is 1. If ZF = 1 ; output is zero. If ZF = 0 ; output is non zero. OF: OF stands for overflow flag. The are two types of numbers 1.Signed 2.Unsigned