SlideShare a Scribd company logo
FLAG REGISTERS
12/23/2016
1
By: Hamza Akash
What is a FLAGS Register??
12/23/2016
2
 The FLAGS register is the status register in Intel x86
microprocessors that contains the current state of the
processor. This register is 16 bits wide. Its successors, the
EFLAGS and RFLAGS registers, are 32 bits and 64 bits
wide, respectively. The wider registers retain compatibility
with their smaller predecessors. We are going to discuss
about the FLAGS registers here.
Category of FLAGS Registers
12/23/2016
3
There are 2 types of FLAGS register.
• Status Flags
• Control Flags
Status Flags
12/23/2016
4
There are 6 status flags in 8086 processor.
• Carry Flag
• Parity Flag
• Adjust Flag
• Zero Flag
• Sign Flag
• Overflow Flag
Carry Flag
12/23/2016
5
In 8086 processors the carry flag (usually indicated as
the C flag) is a single bit in a system status (flag)
register used to indicate when an arithmetic carry or
borrow has been generated out of the most significant
ALU bit position. The carry flag enables numbers larger
than a single ALU width to be added/subtracted by carrying
(adding) a binary digit from a partial addition/subtraction
to the least significant bit position of a more significant
word. It is located in the 0 bits if a 8086 processor
Parity Flag
12/23/2016
6
In 8086 processors the parity flag indicates if
the number of set bits is odd or even in the binary
representation of the result of the last operation. It
is normally a single bit(2) in a processor status
register. For example, assume a machine where a
set parity flag indicates even parity. If the result of
the last operation were 26 (11010 in binary), the
parity flag would be 0 since the number of set bits
is odd. Similarly, if the result were 102 (1100110 in
binary) then the parity flag would be 1.
Adjust Flag & Auxilary Flag
12/23/2016
7
 The Adjust flag (also known as the Auxiliary flag) is a
flag stored in the FLAGS register on all 8086
processors. It is bit 4. It is used to indicate when an
arithmetic carry or borrow has been generated out
of the 4 least significant bits. It is primarily used in
BCD arithmetic.
 Auxiliary flag is set (AF=1) if there is a carry from low
nibble to high nibble or a borrow from a high nibble to
low nibble of the low order 8-bit of a 16-bit
number.(for example, in BCD addition or subtraction.)
Zero Flag
12/23/2016
8
The Zero Flag is a single bit flag located in
6 bit of a 8086 processor. The zero flag is
used to check the result of an arithmetic
operation, including bitwise logical
instructions. It is set if an arithmetic result
is zero, and reset otherwise.
Sign Flag
12/23/2016
9
In a 8086 processor the sign flag or negative
flag is a single bit in a system status (flag) register
used to indicate whether the result of the last
mathematical operation resulted in a value whose
most significant bit was set. In a two's
complement interpretation of the result, the
negative flag is set if the result was negative.
For example, in an 8-bit signed number system, -37
will be represented as 1101 1011 in binary (the most
significant bit is 1), while +37 will be represented as
0010 0101 (the most significant bit is 0).
Overflow flag
12/23/2016
10
In 8086 processors, the overflow flag (sometimes
called V flag) is usually a single bit in a system status
register used to indicate when an arithmetic overflow has
occurred in an operation, indicating that the signed two's-
complement result would not fit in the number of bits used
for the operation (the ALU width).
Control Flags
12/23/2016
11
There are 3 Control flags in 8086 processor.
• Trap Flag
• Interrupt Enable Flag
• Direction Flag
Trap flag
12/23/2016
12
A trap flag permits operation of a processor in single-step
mode. If such a flag is available, debuggers can use it to step
through the execution of a computer program. The 8086
has no instruction to directly set or reset the trap flag..
Interrupt Flag
12/23/2016
13
 Interrupt Flag is a system flag bit in the 8086
processor’s FLAGS register, which determines whether
or not the CPU will handle hardware interrupts.
 The bit, which is bit 9 of the FLAGS register, may be
set or cleared by programs with sufficient privileges, as
usually determined by the Operating System. If the flag
is set to 1, hardware interrupts will be handled. If
cleared (set to 0), such interrupts will be ignored. IF
does not affect the handling of interrupts or software
interrupts generated by the INT instruction.
Direction flag
12/23/2016
14
 The direction flag is a flag that controls the left-to-right or
right-to-left direction of string processing, stored in the FLAGS
register on all 8086 processors. It is bit number 10.
 When it is set to 0 (using the clear-direction-flag instruction
CLD),it means that instructions that auto increment the source
index and destination index (like MOVS) will increase both of
them. In case it is set to 1 (using the set-direction-flag
instruction STD), the instruction will decrease them.
 This flag is used to determine the direction (forward or
backward) in which several bytes of data will be copied from one
place in the memory, to another. The direction is important
mainly when the original data position in memory and the target
data position overlap.
12/23/2016
15
Thank You!!

More Related Content

What's hot

Lecture #3 Flag Register.pptx
Lecture #3 Flag Register.pptxLecture #3 Flag Register.pptx
Lecture #3 Flag Register.pptx
ImranBhatti58
 
Multi core-architecture
Multi core-architectureMulti core-architecture
Multi core-architecturePiyush Mittal
 
Register Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory TransferRegister Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory Transfer
lavanya marichamy
 
INTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSORINTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSOR
Sagar Kuntumal
 
8086 String Instructions.pdf
8086 String Instructions.pdf8086 String Instructions.pdf
8086 String Instructions.pdf
A. S. M. Badrudduza
 
Coal 21- macro in Assembly Programming
Coal 21- macro in Assembly ProgrammingCoal 21- macro in Assembly Programming
Coal 21- macro in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)
Zubair Khalid
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-pptjemimajerome
 
Interrupt 8085
Interrupt 8085Interrupt 8085
Interrupt 8085
Shubham Singh
 
Privilege levels 80386
Privilege levels 80386Privilege levels 80386
Privilege levels 80386
Akshay Nagpurkar
 
IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086
IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086
IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086
COMSATS Abbottabad
 
Register transfer & microoperations moris mano ch 04
Register transfer & microoperations    moris mano ch 04Register transfer & microoperations    moris mano ch 04
Register transfer & microoperations moris mano ch 04
thearticlenow
 
3 Pipelining
3 Pipelining3 Pipelining
3 Pipelining
fika sweety
 
8086 pin diagram description
8086 pin diagram description8086 pin diagram description
8086 pin diagram description
Akhil Singal
 
Lexical analyzer generator lex
Lexical analyzer generator lexLexical analyzer generator lex
Lexical analyzer generator lex
Anusuya123
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architecture
prasadpawaskar
 
8086 new
8086 new8086 new

What's hot (20)

Assembly Language
Assembly LanguageAssembly Language
Assembly Language
 
Lecture #3 Flag Register.pptx
Lecture #3 Flag Register.pptxLecture #3 Flag Register.pptx
Lecture #3 Flag Register.pptx
 
Multi core-architecture
Multi core-architectureMulti core-architecture
Multi core-architecture
 
Register Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory TransferRegister Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory Transfer
 
INTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSORINTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSOR
 
8086 String Instructions.pdf
8086 String Instructions.pdf8086 String Instructions.pdf
8086 String Instructions.pdf
 
Coal 21- macro in Assembly Programming
Coal 21- macro in Assembly ProgrammingCoal 21- macro in Assembly Programming
Coal 21- macro in Assembly Programming
 
Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-ppt
 
8086 Architecture
8086 Architecture8086 Architecture
8086 Architecture
 
Interrupt 8085
Interrupt 8085Interrupt 8085
Interrupt 8085
 
Privilege levels 80386
Privilege levels 80386Privilege levels 80386
Privilege levels 80386
 
8051 archi
8051 archi8051 archi
8051 archi
 
IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086
IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086
IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086
 
Register transfer & microoperations moris mano ch 04
Register transfer & microoperations    moris mano ch 04Register transfer & microoperations    moris mano ch 04
Register transfer & microoperations moris mano ch 04
 
3 Pipelining
3 Pipelining3 Pipelining
3 Pipelining
 
8086 pin diagram description
8086 pin diagram description8086 pin diagram description
8086 pin diagram description
 
Lexical analyzer generator lex
Lexical analyzer generator lexLexical analyzer generator lex
Lexical analyzer generator lex
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architecture
 
8086 new
8086 new8086 new
8086 new
 

Viewers also liked

8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
Poojith Chowdhary
 
Flag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction setFlag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction setaviban
 
8085 121211122657-phpapp01
8085 121211122657-phpapp018085 121211122657-phpapp01
8085 121211122657-phpapp01
SHRADDHA ARON
 
Unit 4 assembly language programming
Unit 4   assembly language programmingUnit 4   assembly language programming
Unit 4 assembly language programming
Kartik Sharma
 
Programming languages
Programming languagesProgramming languages
Programming languages
Archana Maharjan
 
Pin configuration of 8085
Pin configuration of 8085Pin configuration of 8085
Pin configuration of 808582338476
 
The Intel 8086 microprocessor
The Intel 8086 microprocessorThe Intel 8086 microprocessor
The Intel 8086 microprocessor
George Thomas
 
Flags
FlagsFlags
FlagsCME
 
OSI MODEL - A PROJECT
OSI MODEL - A PROJECTOSI MODEL - A PROJECT
OSI MODEL - A PROJECT
Abhi shreshtha
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
Gopikrishna Madanan
 
OSI Model of Networking
OSI Model of NetworkingOSI Model of Networking
OSI Model of Networking
Mukesh Tekwani
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languagesVarun Garg
 
OSI Model
OSI ModelOSI Model
OSI Model
Rahul Bandhe
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011
photomatt
 

Viewers also liked (16)

8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
 
Flag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction setFlag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction set
 
8085 121211122657-phpapp01
8085 121211122657-phpapp018085 121211122657-phpapp01
8085 121211122657-phpapp01
 
Unit 4 assembly language programming
Unit 4   assembly language programmingUnit 4   assembly language programming
Unit 4 assembly language programming
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Pin configuration of 8085
Pin configuration of 8085Pin configuration of 8085
Pin configuration of 8085
 
The Intel 8086 microprocessor
The Intel 8086 microprocessorThe Intel 8086 microprocessor
The Intel 8086 microprocessor
 
Flags
FlagsFlags
Flags
 
OSI MODEL - A PROJECT
OSI MODEL - A PROJECTOSI MODEL - A PROJECT
OSI MODEL - A PROJECT
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
Osi model
Osi modelOsi model
Osi model
 
OSI Model
OSI ModelOSI Model
OSI Model
 
OSI Model of Networking
OSI Model of NetworkingOSI Model of Networking
OSI Model of Networking
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
 
OSI Model
OSI ModelOSI Model
OSI Model
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011
 

Similar to Flagsregistor

Microprocessor- Flaf registor
Microprocessor- Flaf registorMicroprocessor- Flaf registor
Microprocessor- Flaf registor
Esha Abbas
 
microprocessor_part_3_compressed_1588259301.pdf
microprocessor_part_3_compressed_1588259301.pdfmicroprocessor_part_3_compressed_1588259301.pdf
microprocessor_part_3_compressed_1588259301.pdf
ssuserd21262
 
Register & flags
Register & flagsRegister & flags
Register & flags
fazli khaliq
 
Register Organisation of 8086 Microprocessor
Register Organisation of 8086 MicroprocessorRegister Organisation of 8086 Microprocessor
Register Organisation of 8086 MicroprocessorNikhil Kumar
 
Register Organisation of 8086 Microprocessor
Register Organisation of 8086 MicroprocessorRegister Organisation of 8086 Microprocessor
Register Organisation of 8086 MicroprocessorNikhil Kumar
 
Intel Microprocessors 8086 Documentation
Intel Microprocessors 8086 DocumentationIntel Microprocessors 8086 Documentation
Intel Microprocessors 8086 Documentation
Adeel Rasheed
 
Chapter 2
Chapter 2Chapter 2
8086 PPt-2021.pptx
8086 PPt-2021.pptx8086 PPt-2021.pptx
8086 PPt-2021.pptx
AnshuGangwar21
 
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
 
Unit IV 8086 complete ppt, architecture and instruction set.pptx
Unit IV 8086 complete ppt, architecture and instruction set.pptxUnit IV 8086 complete ppt, architecture and instruction set.pptx
Unit IV 8086 complete ppt, architecture and instruction set.pptx
DrVikasMahor
 
lec 2.pptx
lec 2.pptxlec 2.pptx
lec 2.pptx
CharlesAsiedu4
 
8086 Microprocessor
8086 Microprocessor 8086 Microprocessor
8086 Microprocessor
Vijay Kumar
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
Waleed Khan
 
8086 microprocessor
8086 microprocessor8086 microprocessor
8086 microprocessor
savitamhaske
 
INTEL 8086 MP Architecture
INTEL 8086 MP ArchitectureINTEL 8086 MP Architecture
INTEL 8086 MP Architecture
Md. Arif Hossain
 
Microprocessor Architecture.pptx
Microprocessor Architecture.pptxMicroprocessor Architecture.pptx
Microprocessor Architecture.pptx
Captain Price
 
3 organization of intel 8086
3 organization of intel 80863 organization of intel 8086
3 organization of intel 8086ELIMENG
 
physical_address segmentation.pdf
physical_address segmentation.pdfphysical_address segmentation.pdf
physical_address segmentation.pdf
Swapnil511014
 
8086
80868086

Similar to Flagsregistor (20)

Microprocessor- Flaf registor
Microprocessor- Flaf registorMicroprocessor- Flaf registor
Microprocessor- Flaf registor
 
microprocessor_part_3_compressed_1588259301.pdf
microprocessor_part_3_compressed_1588259301.pdfmicroprocessor_part_3_compressed_1588259301.pdf
microprocessor_part_3_compressed_1588259301.pdf
 
Register & flags
Register & flagsRegister & flags
Register & flags
 
Register Organisation of 8086 Microprocessor
Register Organisation of 8086 MicroprocessorRegister Organisation of 8086 Microprocessor
Register Organisation of 8086 Microprocessor
 
Register Organisation of 8086 Microprocessor
Register Organisation of 8086 MicroprocessorRegister Organisation of 8086 Microprocessor
Register Organisation of 8086 Microprocessor
 
Intel Microprocessors 8086 Documentation
Intel Microprocessors 8086 DocumentationIntel Microprocessors 8086 Documentation
Intel Microprocessors 8086 Documentation
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
8086 PPt-2021.pptx
8086 PPt-2021.pptx8086 PPt-2021.pptx
8086 PPt-2021.pptx
 
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
 
Unit IV 8086 complete ppt, architecture and instruction set.pptx
Unit IV 8086 complete ppt, architecture and instruction set.pptxUnit IV 8086 complete ppt, architecture and instruction set.pptx
Unit IV 8086 complete ppt, architecture and instruction set.pptx
 
lec 2.pptx
lec 2.pptxlec 2.pptx
lec 2.pptx
 
8086 Microprocessor
8086 Microprocessor 8086 Microprocessor
8086 Microprocessor
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
8086 microprocessor
8086 microprocessor8086 microprocessor
8086 microprocessor
 
INTEL 8086 MP Architecture
INTEL 8086 MP ArchitectureINTEL 8086 MP Architecture
INTEL 8086 MP Architecture
 
Microprocessor Architecture.pptx
Microprocessor Architecture.pptxMicroprocessor Architecture.pptx
Microprocessor Architecture.pptx
 
3 organization of intel 8086
3 organization of intel 80863 organization of intel 8086
3 organization of intel 8086
 
physical_address segmentation.pdf
physical_address segmentation.pdfphysical_address segmentation.pdf
physical_address segmentation.pdf
 
8086
80868086
8086
 
8086
80868086
8086
 

More from maamir farooq

Ooad lab1
Ooad lab1Ooad lab1
Ooad lab1
maamir farooq
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
maamir farooq
 
Lesson 02
Lesson 02Lesson 02
Lesson 02
maamir farooq
 
Php client libray
Php client librayPhp client libray
Php client libray
maamir farooq
 
Swiftmailer
SwiftmailerSwiftmailer
Swiftmailer
maamir farooq
 
Lect15
Lect15Lect15
Lec 7
Lec 7Lec 7
Lec 6
Lec 6Lec 6
Lec 5
Lec 5Lec 5
J query 1.7 cheat sheet
J query 1.7 cheat sheetJ query 1.7 cheat sheet
J query 1.7 cheat sheet
maamir farooq
 
Assignment
AssignmentAssignment
Assignment
maamir farooq
 
Java script summary
Java script summaryJava script summary
Java script summary
maamir farooq
 
Lec 3
Lec 3Lec 3
Lec 1
Lec 1Lec 1
Css summary
Css summaryCss summary
Css summary
maamir farooq
 
Manual of image processing lab
Manual of image processing labManual of image processing lab
Manual of image processing lab
maamir farooq
 
Session management
Session managementSession management
Session management
maamir farooq
 
Data management
Data managementData management
Data management
maamir farooq
 
Content provider
Content providerContent provider
Content provider
maamir farooq
 

More from maamir farooq (20)

Ooad lab1
Ooad lab1Ooad lab1
Ooad lab1
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 
Lesson 02
Lesson 02Lesson 02
Lesson 02
 
Php client libray
Php client librayPhp client libray
Php client libray
 
Swiftmailer
SwiftmailerSwiftmailer
Swiftmailer
 
Lect15
Lect15Lect15
Lect15
 
Lec 7
Lec 7Lec 7
Lec 7
 
Lec 6
Lec 6Lec 6
Lec 6
 
Lec 5
Lec 5Lec 5
Lec 5
 
J query 1.7 cheat sheet
J query 1.7 cheat sheetJ query 1.7 cheat sheet
J query 1.7 cheat sheet
 
Assignment
AssignmentAssignment
Assignment
 
Java script summary
Java script summaryJava script summary
Java script summary
 
Lec 3
Lec 3Lec 3
Lec 3
 
Lec 2
Lec 2Lec 2
Lec 2
 
Lec 1
Lec 1Lec 1
Lec 1
 
Css summary
Css summaryCss summary
Css summary
 
Manual of image processing lab
Manual of image processing labManual of image processing lab
Manual of image processing lab
 
Session management
Session managementSession management
Session management
 
Data management
Data managementData management
Data management
 
Content provider
Content providerContent provider
Content provider
 

Recently uploaded

1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 

Recently uploaded (20)

1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 

Flagsregistor

  • 2. What is a FLAGS Register?? 12/23/2016 2  The FLAGS register is the status register in Intel x86 microprocessors that contains the current state of the processor. This register is 16 bits wide. Its successors, the EFLAGS and RFLAGS registers, are 32 bits and 64 bits wide, respectively. The wider registers retain compatibility with their smaller predecessors. We are going to discuss about the FLAGS registers here.
  • 3. Category of FLAGS Registers 12/23/2016 3 There are 2 types of FLAGS register. • Status Flags • Control Flags
  • 4. Status Flags 12/23/2016 4 There are 6 status flags in 8086 processor. • Carry Flag • Parity Flag • Adjust Flag • Zero Flag • Sign Flag • Overflow Flag
  • 5. Carry Flag 12/23/2016 5 In 8086 processors the carry flag (usually indicated as the C flag) is a single bit in a system status (flag) register used to indicate when an arithmetic carry or borrow has been generated out of the most significant ALU bit position. The carry flag enables numbers larger than a single ALU width to be added/subtracted by carrying (adding) a binary digit from a partial addition/subtraction to the least significant bit position of a more significant word. It is located in the 0 bits if a 8086 processor
  • 6. Parity Flag 12/23/2016 6 In 8086 processors the parity flag indicates if the number of set bits is odd or even in the binary representation of the result of the last operation. It is normally a single bit(2) in a processor status register. For example, assume a machine where a set parity flag indicates even parity. If the result of the last operation were 26 (11010 in binary), the parity flag would be 0 since the number of set bits is odd. Similarly, if the result were 102 (1100110 in binary) then the parity flag would be 1.
  • 7. Adjust Flag & Auxilary Flag 12/23/2016 7  The Adjust flag (also known as the Auxiliary flag) is a flag stored in the FLAGS register on all 8086 processors. It is bit 4. It is used to indicate when an arithmetic carry or borrow has been generated out of the 4 least significant bits. It is primarily used in BCD arithmetic.  Auxiliary flag is set (AF=1) if there is a carry from low nibble to high nibble or a borrow from a high nibble to low nibble of the low order 8-bit of a 16-bit number.(for example, in BCD addition or subtraction.)
  • 8. Zero Flag 12/23/2016 8 The Zero Flag is a single bit flag located in 6 bit of a 8086 processor. The zero flag is used to check the result of an arithmetic operation, including bitwise logical instructions. It is set if an arithmetic result is zero, and reset otherwise.
  • 9. Sign Flag 12/23/2016 9 In a 8086 processor the sign flag or negative flag is a single bit in a system status (flag) register used to indicate whether the result of the last mathematical operation resulted in a value whose most significant bit was set. In a two's complement interpretation of the result, the negative flag is set if the result was negative. For example, in an 8-bit signed number system, -37 will be represented as 1101 1011 in binary (the most significant bit is 1), while +37 will be represented as 0010 0101 (the most significant bit is 0).
  • 10. Overflow flag 12/23/2016 10 In 8086 processors, the overflow flag (sometimes called V flag) is usually a single bit in a system status register used to indicate when an arithmetic overflow has occurred in an operation, indicating that the signed two's- complement result would not fit in the number of bits used for the operation (the ALU width).
  • 11. Control Flags 12/23/2016 11 There are 3 Control flags in 8086 processor. • Trap Flag • Interrupt Enable Flag • Direction Flag
  • 12. Trap flag 12/23/2016 12 A trap flag permits operation of a processor in single-step mode. If such a flag is available, debuggers can use it to step through the execution of a computer program. The 8086 has no instruction to directly set or reset the trap flag..
  • 13. Interrupt Flag 12/23/2016 13  Interrupt Flag is a system flag bit in the 8086 processor’s FLAGS register, which determines whether or not the CPU will handle hardware interrupts.  The bit, which is bit 9 of the FLAGS register, may be set or cleared by programs with sufficient privileges, as usually determined by the Operating System. If the flag is set to 1, hardware interrupts will be handled. If cleared (set to 0), such interrupts will be ignored. IF does not affect the handling of interrupts or software interrupts generated by the INT instruction.
  • 14. Direction flag 12/23/2016 14  The direction flag is a flag that controls the left-to-right or right-to-left direction of string processing, stored in the FLAGS register on all 8086 processors. It is bit number 10.  When it is set to 0 (using the clear-direction-flag instruction CLD),it means that instructions that auto increment the source index and destination index (like MOVS) will increase both of them. In case it is set to 1 (using the set-direction-flag instruction STD), the instruction will decrease them.  This flag is used to determine the direction (forward or backward) in which several bytes of data will be copied from one place in the memory, to another. The direction is important mainly when the original data position in memory and the target data position overlap.