SlideShare a Scribd company logo
1 of 22
University Of Lucknow
Computer Architecture And Microprocessor
Submitted By
Saqib Ali
Bsc Semester 5
Roll No - 200014025496
Submitted To
Dr Puneet Misra
( Assistant Professor )
Presentation
Topic
Register Organisation & Flags in 8086
Register Organization Of 8086
The 8086 Registers Are Classified Into Following Types :
1.General Purpose Registers
2.Segment Registers
3.Pointers and Index Registers
4.Flag Register
1.General Purpose
Register
General-purpose registers are used to store temporary data within
the microprocessor. There are 8 general-purpose registers in the 8086
microprocessor.
: This is the accumulator. It is of 16 bits and is divided into two 8-bit
registers AH and AL to also perform 8-bit instructions. It is generally
used for arithmetical and logical instructions but in 8086
microprocessor it is not mandatory to have an accumulator as the
destination operand
AX
There are eight general purpose register in 8086 microprocessor
which are explained below:-
This is the base register. It is of 16 bits and is divided into two 8-bit
registers BH and BL to also perform 8-bit instructions. It is used to
store the value of the offset
BX:
This is the counter register. It is of 16 bits and is divided into two
8-bit registers CH and CL to also perform 8-bit instructions. It is
used in looping and rotation
CX:
This is the data register. It is of 16 bits and is divided into two 8-bit
registers DH and DL to also perform 8-bit instructions. It is used in
the multiplication and input/output port addressing.
DX:
This is the stack pointer. It is of 16 bits. It points to the topmost
item of the stack. If the stack is empty the stack pointer will be
(FFFE)H. Its offset address is relative to the stack segment.
SP:
BP: This is the base pointer. It is of 16 bits. It is primarily used in
accessing parameters passed by the stack. Its offset address is relative
to the stack segment.
SI: This is the source index register. It is of 16 bits. It is used in the
pointer addressing of data and as a source in some string-related
operations. Its offset is relative to the data segment.
DI: This is the destination index register. It is of 16 bits. It is used in the
pointer addressing of data and as a destination in some string-related
operations. Its offset is relative to the extra segment.
2.Segment Registers
Segmentation is the process in which the main memory of the
computer is logically divided into different segments and each segment
has its own base address. It is basically used to enhance the speed of
execution of the computer system, so that the processor is able to fetch
and execute the data from the memory easily and fast.
Need For Segmentation
The Bus Interface Unit (BIU) contains four 16 bit special purpose
registers (mentioned below) called as Segment Registers
1:Code segment register (CS)
It is used for addressing memory location in the code segment of
the memory, where the executable program is stored.
2:Data segment register (DS)
It points to the data segment of the memory where the data
is stored.
3:Extra Segment Register (ES)
It also refers to a segment in the memory which is another data
segment in the memory.
4:Stack Segment Register (SS)
It is used for addressing stack segment of the memory. The
stack segment is that segment of memory which is used to
store stack data.
3.Pointers And Index Register
The pointers will always store some address or memory location.
In 8086 Microprocessor, they usually store the offset through
which the actual address is calculated.
1.Instruction Pointer (IP)
The instruction pointer usually stores the address of the next
instruction that is to be executed. Apart from this, it also acts as an
offset for CS register.
2.Base Pointer (BP)
The Base pointer stores the base address of the memory. Also,
it acts as an offset for Stack Segment (SS).
3.Stack Pointer (SP)
The Stack Pointer Points at the current top value of the Stack.
Like the BP, it also acts as an offset to the Stack Segment (SS).
The indexes are used with the extra segment and they usually
are used for copying the contents of a particular block of
memory to a new location.
4.Source Index (SI)
It stores the offset address of the source
5.Destination Index (DI):
It stores the offset address of the Destination.
Stack Pointer
Base Pointer
Source Index
Destination Index
Instruction Pointer
4.Flag Register
Flag register is one of the special purpose registers. The Flag Register
is a 16-bit register and there are only 9 accessible flags on the 8086
microprocessors. Therefore the remaining 7 bits are idle.
There are two categories of flag register:
1.Condition Flags
2.Control Flags
The conditional flags are set or reset after any arithmetic
or logical operation is performed on an 8 bit or 16-bit
number. This category consists of the following 6 flags:
1) Condition Flags
i.Carry Flag (CF): The carry flag will be set only if a carry
is generated from the MSB of the result after doing any
operation in 8086 Microprocessor.
ii. Parity Flag (PF): Parity is related to the number of 1’s
contained in the binary data. There exist two types of
parity:
•Even Parity: When the number of 1’s in the binary data
are even.
•Odd Parity: When the number of 1’s in the binary data
are odd.
iii. Auxiliary-Carry Flag (AF): This flag is set if there is
a generation of carrying from a nibble, i.e. 4 bits of
data.
iv. Zero Flag (ZF): If the result after performing the
required operation (Arithmetic or Logical) on the
instructions is zero, in that case, the zero flags are set to 1.
Else, it remains reset.
V. Sign Flag (SF): If the result after performing any
arithmetic or logic operation in the given instruction is
negative, then the sign flag is set to 1. Else, for a positive
result, the sign flag remains reset.
Vi. Overflow Flag (OF): This Flag will be set if the
register gets overflowed with data after any arithmetic or
logic operation. This happens in cases when the carry is
getting in in MSB, but there is no space in the register to
store the carried out bit.
The control flags are used to navigate the
microprocessor for certain operations. There are 3 types
of control flags:
2) Control Flags
i.Trap Flag (TF): This flag is used of we need single-step
debugging in our code. If the TF is set, then the
execution will be done step by step. Otherwise, the free-
running operation will be done.
ii. Interrupt Flag (IF): This flag is used to enable the
Interrupt. The microprocessor is capable of handling
interrupts only if this flag is in the set mode. Otherwise,
any interrupt raised while the execution of the
instructions will not be handled by the microprocessor.
iii. Direction Flag (DF): This flag is used for string
operations. If this flag is set, the string will be read from
higher-order bits to lower order bits and vice versa.
Thank
You

More Related Content

Similar to SAQIB ALI.pptx

N_Asm Assembly registers (sol)
N_Asm Assembly registers (sol)N_Asm Assembly registers (sol)
N_Asm Assembly registers (sol)Selomon birhane
 
The Intel 8086 microprocessor
The Intel 8086 microprocessorThe Intel 8086 microprocessor
The Intel 8086 microprocessorGeorge Thomas
 
8086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp018086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp01jemimajerome
 
digital communication,micro processor,pulse and digital circuits
digital communication,micro processor,pulse and digital circuitsdigital communication,micro processor,pulse and digital circuits
digital communication,micro processor,pulse and digital circuitsManasa Mona
 
Register introduction
Register introductionRegister introduction
Register introductionmaamir farooq
 
8086 class notes-Y.N.M
8086 class notes-Y.N.M8086 class notes-Y.N.M
8086 class notes-Y.N.MDr.YNM
 
26677766 8086-microprocessor-architecture-110905125037-phpapp02
26677766 8086-microprocessor-architecture-110905125037-phpapp0226677766 8086-microprocessor-architecture-110905125037-phpapp02
26677766 8086-microprocessor-architecture-110905125037-phpapp02Avijeet Negel
 
Internal architecture-of-8086
Internal architecture-of-8086Internal architecture-of-8086
Internal architecture-of-8086Estiak Khan
 
Architecture of 8086 microprocessor
Architecture of  8086 microprocessorArchitecture of  8086 microprocessor
Architecture of 8086 microprocessorAnirban Saha Anik
 
Introduction to CPU registers
Introduction to CPU registersIntroduction to CPU registers
Introduction to CPU registersMuhammad Waqas
 
8086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp018086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp01destaw belay
 
8086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp018086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp01Siva Raman
 

Similar to SAQIB ALI.pptx (20)

N_Asm Assembly registers (sol)
N_Asm Assembly registers (sol)N_Asm Assembly registers (sol)
N_Asm Assembly registers (sol)
 
intel 8086 introduction
intel 8086 introductionintel 8086 introduction
intel 8086 introduction
 
The Intel 8086 microprocessor
The Intel 8086 microprocessorThe Intel 8086 microprocessor
The Intel 8086 microprocessor
 
Arch 8086
Arch 8086Arch 8086
Arch 8086
 
8086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp018086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp01
 
digital communication,micro processor,pulse and digital circuits
digital communication,micro processor,pulse and digital circuitsdigital communication,micro processor,pulse and digital circuits
digital communication,micro processor,pulse and digital circuits
 
110 ec0644
110 ec0644110 ec0644
110 ec0644
 
8086 archi notes final
8086 archi notes final8086 archi notes final
8086 archi notes final
 
8086 archi notes final
8086 archi notes final8086 archi notes final
8086 archi notes final
 
Register introduction
Register introductionRegister introduction
Register introduction
 
8086 class notes-Y.N.M
8086 class notes-Y.N.M8086 class notes-Y.N.M
8086 class notes-Y.N.M
 
26677766 8086-microprocessor-architecture-110905125037-phpapp02
26677766 8086-microprocessor-architecture-110905125037-phpapp0226677766 8086-microprocessor-architecture-110905125037-phpapp02
26677766 8086-microprocessor-architecture-110905125037-phpapp02
 
Internal architecture-of-8086
Internal architecture-of-8086Internal architecture-of-8086
Internal architecture-of-8086
 
Intel 8086
Intel 8086 Intel 8086
Intel 8086
 
Architecture of 8086 microprocessor
Architecture of  8086 microprocessorArchitecture of  8086 microprocessor
Architecture of 8086 microprocessor
 
Introduction to CPU registers
Introduction to CPU registersIntroduction to CPU registers
Introduction to CPU registers
 
8086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp018086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp01
 
8086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp018086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp01
 
register
registerregister
register
 
microprocessor
 microprocessor microprocessor
microprocessor
 

Recently uploaded

Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 

Recently uploaded (20)

Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 

SAQIB ALI.pptx

  • 1. University Of Lucknow Computer Architecture And Microprocessor Submitted By Saqib Ali Bsc Semester 5 Roll No - 200014025496 Submitted To Dr Puneet Misra ( Assistant Professor ) Presentation
  • 3. Register Organization Of 8086 The 8086 Registers Are Classified Into Following Types : 1.General Purpose Registers 2.Segment Registers 3.Pointers and Index Registers 4.Flag Register
  • 4.
  • 5. 1.General Purpose Register General-purpose registers are used to store temporary data within the microprocessor. There are 8 general-purpose registers in the 8086 microprocessor.
  • 6. : This is the accumulator. It is of 16 bits and is divided into two 8-bit registers AH and AL to also perform 8-bit instructions. It is generally used for arithmetical and logical instructions but in 8086 microprocessor it is not mandatory to have an accumulator as the destination operand AX There are eight general purpose register in 8086 microprocessor which are explained below:- This is the base register. It is of 16 bits and is divided into two 8-bit registers BH and BL to also perform 8-bit instructions. It is used to store the value of the offset BX:
  • 7. This is the counter register. It is of 16 bits and is divided into two 8-bit registers CH and CL to also perform 8-bit instructions. It is used in looping and rotation CX: This is the data register. It is of 16 bits and is divided into two 8-bit registers DH and DL to also perform 8-bit instructions. It is used in the multiplication and input/output port addressing. DX: This is the stack pointer. It is of 16 bits. It points to the topmost item of the stack. If the stack is empty the stack pointer will be (FFFE)H. Its offset address is relative to the stack segment. SP:
  • 8. BP: This is the base pointer. It is of 16 bits. It is primarily used in accessing parameters passed by the stack. Its offset address is relative to the stack segment. SI: This is the source index register. It is of 16 bits. It is used in the pointer addressing of data and as a source in some string-related operations. Its offset is relative to the data segment. DI: This is the destination index register. It is of 16 bits. It is used in the pointer addressing of data and as a destination in some string-related operations. Its offset is relative to the extra segment.
  • 9. 2.Segment Registers Segmentation is the process in which the main memory of the computer is logically divided into different segments and each segment has its own base address. It is basically used to enhance the speed of execution of the computer system, so that the processor is able to fetch and execute the data from the memory easily and fast. Need For Segmentation The Bus Interface Unit (BIU) contains four 16 bit special purpose registers (mentioned below) called as Segment Registers
  • 10. 1:Code segment register (CS) It is used for addressing memory location in the code segment of the memory, where the executable program is stored. 2:Data segment register (DS) It points to the data segment of the memory where the data is stored.
  • 11. 3:Extra Segment Register (ES) It also refers to a segment in the memory which is another data segment in the memory. 4:Stack Segment Register (SS) It is used for addressing stack segment of the memory. The stack segment is that segment of memory which is used to store stack data.
  • 12. 3.Pointers And Index Register The pointers will always store some address or memory location. In 8086 Microprocessor, they usually store the offset through which the actual address is calculated. 1.Instruction Pointer (IP) The instruction pointer usually stores the address of the next instruction that is to be executed. Apart from this, it also acts as an offset for CS register.
  • 13. 2.Base Pointer (BP) The Base pointer stores the base address of the memory. Also, it acts as an offset for Stack Segment (SS). 3.Stack Pointer (SP) The Stack Pointer Points at the current top value of the Stack. Like the BP, it also acts as an offset to the Stack Segment (SS). The indexes are used with the extra segment and they usually are used for copying the contents of a particular block of memory to a new location.
  • 14. 4.Source Index (SI) It stores the offset address of the source 5.Destination Index (DI): It stores the offset address of the Destination. Stack Pointer Base Pointer Source Index Destination Index Instruction Pointer
  • 15. 4.Flag Register Flag register is one of the special purpose registers. The Flag Register is a 16-bit register and there are only 9 accessible flags on the 8086 microprocessors. Therefore the remaining 7 bits are idle.
  • 16. There are two categories of flag register: 1.Condition Flags 2.Control Flags The conditional flags are set or reset after any arithmetic or logical operation is performed on an 8 bit or 16-bit number. This category consists of the following 6 flags: 1) Condition Flags
  • 17. i.Carry Flag (CF): The carry flag will be set only if a carry is generated from the MSB of the result after doing any operation in 8086 Microprocessor. ii. Parity Flag (PF): Parity is related to the number of 1’s contained in the binary data. There exist two types of parity: •Even Parity: When the number of 1’s in the binary data are even. •Odd Parity: When the number of 1’s in the binary data are odd.
  • 18. iii. Auxiliary-Carry Flag (AF): This flag is set if there is a generation of carrying from a nibble, i.e. 4 bits of data. iv. Zero Flag (ZF): If the result after performing the required operation (Arithmetic or Logical) on the instructions is zero, in that case, the zero flags are set to 1. Else, it remains reset.
  • 19. V. Sign Flag (SF): If the result after performing any arithmetic or logic operation in the given instruction is negative, then the sign flag is set to 1. Else, for a positive result, the sign flag remains reset. Vi. Overflow Flag (OF): This Flag will be set if the register gets overflowed with data after any arithmetic or logic operation. This happens in cases when the carry is getting in in MSB, but there is no space in the register to store the carried out bit.
  • 20. The control flags are used to navigate the microprocessor for certain operations. There are 3 types of control flags: 2) Control Flags i.Trap Flag (TF): This flag is used of we need single-step debugging in our code. If the TF is set, then the execution will be done step by step. Otherwise, the free- running operation will be done.
  • 21. ii. Interrupt Flag (IF): This flag is used to enable the Interrupt. The microprocessor is capable of handling interrupts only if this flag is in the set mode. Otherwise, any interrupt raised while the execution of the instructions will not be handled by the microprocessor. iii. Direction Flag (DF): This flag is used for string operations. If this flag is set, the string will be read from higher-order bits to lower order bits and vice versa.