Redirected
edited by
1,640 views
3 votes
3 votes

In $8085$ microprocessor which of the following flag(s) is (are) affected by an arithmetic operation?

  1. AC flag only
  2. CY flag Only
  3. Z flag Only
  4. AC, CY, Z flags
edited by

2 Answers

0 votes
0 votes
Ans: d

Flags in 8085 are zero flag, carry flag, sign flag, parity flag and auxiliary carry flag. All these gets affected by an arithmetic operation.
0 votes
0 votes

ALU of 8085 have five flip flops whose states (set/reset) are determined by the result data of other registers and accumulator.

They are called as Zero, Carry, Sign, Parity and Auxiliary-Carry flags.

  • Zero Flag (Z): When an arithmetic operation results in zero , the flip-flop called the Zero flag - which is set to one.
  • Carry flag (CY): After an addition of two numbers, if the sum in the accumulator is larger than eight bits, then the flip-flop uses to indicate a carry called the Carry flag – which is set to one.
  • Sign (S): It is set to 1, if bit D7 of the result = 1; otherwise reset. D7 is the first digit of a binary number.
  • Parity (P): If the result has an even number of 1s, the flag is set to 1; for an odd number of 1s the flag is reset.
  • Auxiliary Carry (AC): In an arithmetic operation, when a carry is generated by digit D3 and passed to digit D4, the AC flag is set. Generally this flag is used internally for Binary Coded Decimals (BCD).

Figure shows a 8-bit flag register, adjacent to the accumulator. It is not used as a register. Out of eight bit-positions, five positions are used to store the outputs of five flip-flops.

Some of the arithmetic operations are -

  1. ADD : Add
  2. ADI : Add Immediate
  3. SUB : Subtract
  4. SUI : Subtract Immediate

 

So all of the given options will be correct.

Answer:

Related questions

1 votes
1 votes
1 answer
1
Arjun asked Nov 5, 2017
1,697 views
In the architecture of $8085$ microprocessor match the following :$\begin{array}{clcl} \text{(a)} & \text{Processing unit} & \text{(i)} & \text{Interrupt} \\ \text{(b)}...
1 votes
1 votes
0 answers
2