SlideShare a Scribd company logo
11
Most read
12
Most read
15
Most read
GENERAL PURPOSE & FLAG REGISTERS
Made by Asmita
Dept MCS
27/12/2017
REGISTERS
REGISTERS IN COMPUTERS
To speed up the processor operations,
the processor includes some internal memory
storage locations, called registers.
Registers
Processing element
Main Memory
Address bus
Data bus
Control bus
WHY REGISTERS????
TYPES OF REGISTERS::
GGGU • S
General Purpose
Used for more than one
purpose.
1.AX Accumlator
2.BX Base
3.CX Count
4.DX Destination
X=SIZE
AH AL
Special Purpose
Used for only one purpose for which
they are made.
1.IP/(PC)= instruction pointer.
2.IR=instuction registers.
3.BP=base pointer.
4.SP=stack pointer.
5.SI=source index registers.
6.DI=destination registers.
7.CS= code segment registers.
8.DS=data segment registers
9.ES=extra segment registers
10.SS=stack segment registers.
AX
CPU word size/ CPU width
 Its mean how many NO. of bits that can be
processed by processor.
0 1 2 3 4 5
A
Base Registers = Starting Address
For(int i=0; i<10; i++)
Cout<<“welcome”;
Num1*Num2 = 38 bits answer
General purpose also uses
in
 Takes input.
 Display output.
 Stores intermediate results.
Flags  A flag is a piece of
fabric (most often
rectangular or
quadrilateral) with
a distinctive
design that is used
as a symbol, as a
signaling device,
or as decoration.
Flag registers of 8086
Carry flag
1
1100 1000 ax
+
1101 0010 bx
_________________
11101 1010
If there comes a carry then the value of carry flag
becomes 1
Otherwise 0
Parity flag
 Used for error detection and correction.
 To ensure that the received data is exactly as
it is as send data.
Regiters RAM
1 1 0 1 0 1 1 01 1 0 000
Due to voltage
Send data Lost /corrupt
P
0
Flag registerEVEN parity
If 1’s is even=0
If 1’s is odd=1
Auxilary flag
1 1
0100 1100
+
1100 1110
________________________
10001 1110
Z
0
A
1
C
1
Flag registers
Zero flag
2
_
2
________
0
(here the value of zero register will be 1)
When the ans=0
Then the zero flag become 1
Otherwise 0.
Sign registers
2
+
-6
_________
4
6
+
2
_______
8
S
0
For positive value it
becomes=0
Otherwise=1
Trap flag
 Used to facilitate debugger.
 Executes each line of code, values in
variables.
 When trap flag =1,
 It Goes in single step execution mode.
 And tells which value is in variables, in
registers and all information.
_________________________
________________________
________________________
Interrupt flag
 A signal generated by h/w or s/w for getting CPU attention.
 If the value of interrupt register =1
 Than the CPU leave its work and works on interrupt.
 But if the value =0, then CPU Continue its own work and
ignores interrupt.
 Flag register
 Interrupt
I
1
CPU
Programmable Interupt Controller
PIC CPU
I
0
INTERRUPT
FLAG Register
Direction flag
 Tells us In which direction the processing of
string will happen?
 If the value of direction flag=0, then the string
processing starts from left to right.
 But if the value=1 , then its display the string
from high index to low index means from right to
left.
 “IloveAssembly”
 “ylbmessAevolI”
Overflow flags
 n1* n2= answer more than 16 bits.
 n1+n2= 17 bits.
 A register can store maximum 16 bits of data.
 So when the answer comes more than the 16 bit,
the execding data will be waste,
 So this register tells us that your data will be
waste and the value of overflow register
becomes =1
 Otherwise =0.
Flag registers (assembly language) with types and examples

More Related Content

PPS
Cache memory
PPTX
Interrupts on 8086 microprocessor by vijay kumar.k
PPTX
ADDRESSING MODES
PPTX
Register transfer and micro-operation
PPT
Instruction Set Architecture (ISA)
PPTX
Interrupt presentaion
PPTX
Control unit
PDF
8 memory management strategies
Cache memory
Interrupts on 8086 microprocessor by vijay kumar.k
ADDRESSING MODES
Register transfer and micro-operation
Instruction Set Architecture (ISA)
Interrupt presentaion
Control unit
8 memory management strategies

What's hot (20)

PPTX
System software
PPTX
Flag Registers (Assembly Language)
PPT
Registers
PPTX
Operating system memory management
PPTX
Memory management ppt
PPTX
Memory Hierarchy
PPTX
Interrupts of 8086
PPT
Assembly language
PPTX
register
PPTX
Types Of Buses
PPTX
bus and memory tranfer (computer organaization)
PPT
Flynns classification
PPTX
Assembly Language
PPTX
Cache Memory
PPTX
Stack organization
PDF
Pipelining and ILP (Instruction Level Parallelism)
PPTX
memory reference instruction
PPTX
Instruction Execution Cycle
PPTX
contiguous memory allocation.pptx
PPT
Semiconductor memory
System software
Flag Registers (Assembly Language)
Registers
Operating system memory management
Memory management ppt
Memory Hierarchy
Interrupts of 8086
Assembly language
register
Types Of Buses
bus and memory tranfer (computer organaization)
Flynns classification
Assembly Language
Cache Memory
Stack organization
Pipelining and ILP (Instruction Level Parallelism)
memory reference instruction
Instruction Execution Cycle
contiguous memory allocation.pptx
Semiconductor memory
Ad

Similar to Flag registers (assembly language) with types and examples (20)

PPTX
9_2019_01_06!10_26_04_PM.pptx what is register
PPTX
Lecture_about spm and related issues 3_COAL.pptx
PDF
mod1 microprocessor ppt if you want you can download it if younwant to study ...
PDF
N_Asm Assembly registers (sol)
DOCX
Introduction to CPU registers
PPTX
Register introduction
PPTX
Internal architecture-of-8086
DOCX
c++
PPT
Addressing modes (detailed data path)
PDF
MPMC PPT_MODULE 1&2 Jan202mmmmmmmmmmm4.pdf
DOCX
computer organization and assembly language.docx
DOCX
Computer Organization and 8085 microprocessor notes
PPTX
SPECIAL PURPOSE REGISTERS SPECIAL .pptx
PPT
Unit 3 assembler and processor
PPT
programmer model and registers of 8086.ppt
PPT
programmer model and registers of 8086.ppt
PPTX
Pin Diagram and block diagram 8085 .pptx
PPTX
Lecture_3.1 Registers.pptx....................
PPTX
8085 microprocessor architecture
PPTX
Instruction codes
9_2019_01_06!10_26_04_PM.pptx what is register
Lecture_about spm and related issues 3_COAL.pptx
mod1 microprocessor ppt if you want you can download it if younwant to study ...
N_Asm Assembly registers (sol)
Introduction to CPU registers
Register introduction
Internal architecture-of-8086
c++
Addressing modes (detailed data path)
MPMC PPT_MODULE 1&2 Jan202mmmmmmmmmmm4.pdf
computer organization and assembly language.docx
Computer Organization and 8085 microprocessor notes
SPECIAL PURPOSE REGISTERS SPECIAL .pptx
Unit 3 assembler and processor
programmer model and registers of 8086.ppt
programmer model and registers of 8086.ppt
Pin Diagram and block diagram 8085 .pptx
Lecture_3.1 Registers.pptx....................
8085 microprocessor architecture
Instruction codes
Ad

More from Computer_ at_home (7)

PPTX
Association for computing machinery
PPT
Diffie-hellman algorithm
PPTX
Ip addresses
PPTX
Project scheduling and tracking
PPTX
Project scheduling and tracking
PPTX
Message passing ( in computer science)
PPTX
Selection sort(sorting algorithm in data structure) and its time complexity
Association for computing machinery
Diffie-hellman algorithm
Ip addresses
Project scheduling and tracking
Project scheduling and tracking
Message passing ( in computer science)
Selection sort(sorting algorithm in data structure) and its time complexity

Recently uploaded (20)

PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Cell Types and Its function , kingdom of life
PPTX
master seminar digital applications in india
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
Pre independence Education in Inndia.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Cell Structure & Organelles in detailed.
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Business Ethics Teaching Materials for college
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Institutional Correction lecture only . . .
PDF
VCE English Exam - Section C Student Revision Booklet
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Cell Types and Its function , kingdom of life
master seminar digital applications in india
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Pre independence Education in Inndia.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Anesthesia in Laparoscopic Surgery in India
Supply Chain Operations Speaking Notes -ICLT Program
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Cell Structure & Organelles in detailed.
Abdominal Access Techniques with Prof. Dr. R K Mishra
STATICS OF THE RIGID BODIES Hibbelers.pdf
Business Ethics Teaching Materials for college
FourierSeries-QuestionsWithAnswers(Part-A).pdf
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PPH.pptx obstetrics and gynecology in nursing
Institutional Correction lecture only . . .
VCE English Exam - Section C Student Revision Booklet

Flag registers (assembly language) with types and examples

  • 1. GENERAL PURPOSE & FLAG REGISTERS Made by Asmita Dept MCS 27/12/2017
  • 3. REGISTERS IN COMPUTERS To speed up the processor operations, the processor includes some internal memory storage locations, called registers.
  • 4. Registers Processing element Main Memory Address bus Data bus Control bus WHY REGISTERS????
  • 5. TYPES OF REGISTERS:: GGGU • S General Purpose Used for more than one purpose. 1.AX Accumlator 2.BX Base 3.CX Count 4.DX Destination X=SIZE AH AL Special Purpose Used for only one purpose for which they are made. 1.IP/(PC)= instruction pointer. 2.IR=instuction registers. 3.BP=base pointer. 4.SP=stack pointer. 5.SI=source index registers. 6.DI=destination registers. 7.CS= code segment registers. 8.DS=data segment registers 9.ES=extra segment registers 10.SS=stack segment registers. AX
  • 6. CPU word size/ CPU width  Its mean how many NO. of bits that can be processed by processor.
  • 7. 0 1 2 3 4 5 A Base Registers = Starting Address
  • 8. For(int i=0; i<10; i++) Cout<<“welcome”; Num1*Num2 = 38 bits answer
  • 9. General purpose also uses in  Takes input.  Display output.  Stores intermediate results.
  • 10. Flags  A flag is a piece of fabric (most often rectangular or quadrilateral) with a distinctive design that is used as a symbol, as a signaling device, or as decoration.
  • 12. Carry flag 1 1100 1000 ax + 1101 0010 bx _________________ 11101 1010 If there comes a carry then the value of carry flag becomes 1 Otherwise 0
  • 13. Parity flag  Used for error detection and correction.  To ensure that the received data is exactly as it is as send data.
  • 14. Regiters RAM 1 1 0 1 0 1 1 01 1 0 000 Due to voltage Send data Lost /corrupt P 0 Flag registerEVEN parity If 1’s is even=0 If 1’s is odd=1
  • 15. Auxilary flag 1 1 0100 1100 + 1100 1110 ________________________ 10001 1110
  • 17. Zero flag 2 _ 2 ________ 0 (here the value of zero register will be 1) When the ans=0 Then the zero flag become 1 Otherwise 0.
  • 19. Trap flag  Used to facilitate debugger.  Executes each line of code, values in variables.  When trap flag =1,  It Goes in single step execution mode.  And tells which value is in variables, in registers and all information. _________________________ ________________________ ________________________
  • 20. Interrupt flag  A signal generated by h/w or s/w for getting CPU attention.  If the value of interrupt register =1  Than the CPU leave its work and works on interrupt.  But if the value =0, then CPU Continue its own work and ignores interrupt.  Flag register  Interrupt I 1 CPU
  • 21. Programmable Interupt Controller PIC CPU I 0 INTERRUPT FLAG Register
  • 22. Direction flag  Tells us In which direction the processing of string will happen?  If the value of direction flag=0, then the string processing starts from left to right.  But if the value=1 , then its display the string from high index to low index means from right to left.  “IloveAssembly”  “ylbmessAevolI”
  • 23. Overflow flags  n1* n2= answer more than 16 bits.  n1+n2= 17 bits.  A register can store maximum 16 bits of data.  So when the answer comes more than the 16 bit, the execding data will be waste,  So this register tells us that your data will be waste and the value of overflow register becomes =1  Otherwise =0.