What is the use of flags in 8085 microprocessor?

I am not able to understand the concept of flags in 8085 microprocessor and 😁

Replies

  • imnitsy
    imnitsy
    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
    sonujain
    thenx no doubt
  • piyushh
    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 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
    imnitsy
    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
    piyushh
    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
    Sanjaykmr852
    How the parity flag is used in serial communication?
  • Jeffrey Arulraj
    Jeffrey Arulraj
    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

You are reading an archived discussion.

Related Posts

how the negative voltage is generated using positive for some application
explain me the difference between the comprator and opamp using follwing example: 1) if my v+ is 12v and my v- is 0v, input + is 3v and input- is...
plz somebody tell me i will tell the situation and then i will tell my question.... let us take you are playing an movie in ur windows or linux u...
Can someone acquaint me the scope of AVIONICS .I wish to do my MTECH in AVONICS.
can anyone help me for some new slogans related to mechanical engineering for my new college overcoat??please suggest me some.