CrazyEngineers
  • What is the use of flags in 8085 microprocessor?

    sonujain

    sonujain

    @sonujain-41NDsV
    Updated: Oct 22, 2024
    Views: 1.6K
    I am not able to understand the concept of flags in 8085 microprocessor and 😁
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • imnitsy

    MemberJan 30, 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.
    Are you sure? This action cannot be undone.
    Cancel
  • sonujain

    MemberJan 30, 2010

    thenx no doubt
    Are you sure? This action cannot be undone.
    Cancel
  • piyushh

    MemberJan 30, 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...
    Are you sure? This action cannot be undone.
    Cancel
  • imnitsy

    MemberJan 30, 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 ??😕
    Are you sure? This action cannot be undone.
    Cancel
  • piyushh

    MemberJan 30, 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...
    Are you sure? This action cannot be undone.
    Cancel
  • Sanjaykmr852

    MemberJul 17, 2015

    How the parity flag is used in serial communication?
    Are you sure? This action cannot be undone.
    Cancel
  • Jeffrey Arulraj

    MemberJul 27, 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
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register