CrazyEngineers Archive
Old, but evergreen and popular discussions on CrazyEngineers, presented to you in read-only mode.
@sonujain • 30 Jan, 2010
I am not able to understand the concept of flags in 8085 microprocessor and 😁
@imnitsy • 30 Jan, 2010 well flags are used in mu p comparison and decesion making purposes like:

comparison between two values are typically performed by subtracting them.We can determine the relationship between two values by examining the differnc,

1. If the first is larger then the second the result is positive.
2. If the first is smaller then the second the result is negative.
3. If both are equal then the result is zero.

there are following types of Flags in Mu P:

1. Zero Flag

Determinng wheather two values are equal requires the ALU to determine wheather the result is zero. This can be accomplished by feeding each bit of the result to the NOR gate.

2.Overflow Flag

this flag is used to determine wheather the reult of addition is larger then the maximum size or the result of the substraction is smaller then possible.

3.Borrow/Carry Flag

This flag indicates when the value of the result is lager then the accumulator can represent or when the value of the result is smaller then the accumulator can represent.

if you have further more doubts, please tell about those.

correct me if i am wrong.
@sonujain • 30 Jan, 2010 thenx no doubt
@piyushh • 30 Jan, 2010 imnitsy there in no overflow flag in 8085 ...we have total five flags in 8085 > auxilary carryflag, parity flag, sign flag,carry/borrow flag and .zero flag..

but auxilary carryflag is neither user accessible nor used by the user or programmer..it used by microprocessor when the 8 bits in the accumulator needs to be changed from decimal to bcd by adding six.to decimal number...that means the mp will add six to acc byte...when there is any borrow from lower nibble(lower4bits of accumolator) to upper nibble ..mp cheak it by looking this flag set
.
.sign flag is used simply to represent the sign of the byte in accumulator .i.e 1 for negative n 0 for positive

BASICALLY for microprocessor sign flag is only the most significant bit (MSB i.e left most bit) of the accumolator ..that means if the msb of acc byte is 1 then the number is negative...
@imnitsy • 30 Jan, 2010
piyushh
imnitsy there in no overflow flag in 8085 ...we have total five flags in 8085 > auxilary carryflag, parity flag, sign flag,carry/borrow flag and .zero flag..

but auxilary carryflag is neither user accessible nor used by the user or programmer..it used by microprocessor when the 8 bits in the acumulator needs to be changed from decimal to bcd y adding six..this flag sets when there is any borrow from lower nibble(lower4bits of accumolator) to upper nibble
.
.sign flag is used simply to represent the sign of the byte in accumulator .i.e 1 for negative n 0 for positive

BASICALLY for microprocessor sign flag is only the most significant bit (MSB i.e left most bit) of the accumolator ..that means if the msb of acc byte is 1 then the number is negative...
well,carry/borrow flag can also be termed as overflow/underflow flag!!

ok well what is the function of parity flag ??😕
@piyushh • 30 Jan, 2010
imnitsy
well,carry/borrow flag can also be termed as overflow/underflow flag!!

ok well what is the function of parity flag ??😕
scroll up buddy , see you have considered as two different flags i.e carry/borrow flag and overflow flag

well..nop carry flag is actually different then overflow flag..

the difference can be seen in the operation like multiplication n division
in 8085 it cant performs other arthimatic operations then addition n subtraction, ut can do when a maths co processor is attached

for that first you must be having the knolwdge of ACTUAL algorithms used in processors for sirthmatic calculations like floating n fixed point operation..of sub,add,mult,div

in 8086 we have both of these flags i.e carry/borrow flag and overflow flag


parity simply gives the even or odd number of 1's or 0's in the byte accumulator
for odd parity you have od numbers of ones n the parity flag is set then...
@Sanjaykmr852 • 17 Jul, 2015 How the parity flag is used in serial communication?
@Jeffrey Arulraj • 28 Jul, 2015
Sanjaykmr852
How the parity flag is used in serial communication?
Parity flag can be used to check whether the communicated message is of proper format and if there are any errors in the message.

You should know about Even parity error correction and even parity code generators to know more about this
7.3k views

Related Posts

@ms_cs · Aug 23, 2012

CEans, I'm a BE graduate and working in MNC as developer. Now I have got 2 years of work experience, I would like to apply for executive mba, or part...
5k views

@monkey_007 · Feb 23, 2013

I've placed in HCL-slocum through campus. HCL slocum is susidiary of HCL company. Do anyone know about this slocum.Is it worthy to join ??? please help me .....
11.7k views

@Ankita Katdare · Sep 13, 2011

'Customer is the King' - Is the statement still valid?1. You have to assume that you are one of the members of a real GD. 2. Members of a GD...
4.6k views

@Naman Agarwal · Jun 2, 2013

What is the resistance between neutral and earth??
9.2k views

@Ankita Katdare · Jul 25, 2015

I am sure beginners like me who've started reading and writing about car only a few years back had a tough time understanding what certain car specifications meant. I realized...
13k views