मराठी
महाराष्ट्र राज्य शिक्षण मंडळएचएससी विज्ञान (संगणक विज्ञान) इयत्ता १२ वी

Explain any four flags of 8085, giving example. - Computer Science 2

Advertisements
Advertisements

प्रश्न

Explain any four flags of 8085, giving example.

Enlist different flags provided by 8085 Micro-processor and explain with suitable examples.

स्पष्ट करा
Advertisements

उत्तर

8085 has five flags. Sign flag, zero flag, Auxiliary carry flag, Parity flag and Carry flag. A 8-bit register is used to represent five flags as shown in following figure.

Where S - Sign flag, Z- Zero flag, Ac- Auxiliary carry flag, P - Parity flag, Cy- Carry flag.

1. Sign flag (S):

  • It is set according to the MSB (D7) of the result.
  • If MSB = 1, the result is negative and S = 1.
  • Example:
    Result = 80H (10000000₂) → S = 1

2. Zero flag (Z):

  • It is set to 1 if the result of an operation is zero.
  • Example:
    A = 05H, SUB 05H → Result = 00H, Z = 1

3. Auxiliary carry flag (Ac):

  • It is set if there is a carry from bit D3 to D4.
  • Used mainly in BCD arithmetic.
  • Example:
    A = 0FH, ADD 01H → AC = 1

4. Parity flag (P):

  • It is set to 1 if the result contains an even number of 1s.
  • Example:
    Result = 03H (00000011₂ has two 1s) → P = 1

5. Carry Flag (Cy):

  • It is set to 1 if the result contains an even number of 1s.
  • Example:
    Result = 03H (00000011₂ has two 1s) → P = 1
shaalaa.com

Notes

Students should refer to the answer according to their question and preferred marks.

  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2014-2015 (March)

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×