Machine-translated by Google. Questions are authored in English.
Top

Discussion

After performing the addition of 47H and 51H the status of the zoro (Z), Carry (Cy), Sign (S), Parity (P), Auxiliary (AC) are :

  • A.S = 1, Z = 0, AC = 0, P = 0, Cy = 0
  • B.S = 0, Z = 1, AC = 1, P = 1, Cy = 1
  • C.S = 1, Z = 1, AC = 1, P = 0, Cy = 0
  • D.None of the above

Answer: A

The flags are S = 1, Z = 0, AC = 0, P = 0, Cy = 0.

\[ \begin{aligned} 47\text{H} &= 0100\,0111 \\ 51\text{H} &= 0101\,0001 \\ \text{sum} &= 1001\,1000 = 98\text{H} \end{aligned} \]

  • S = 1: bit 7 of the result is 1.
  • Z = 0: the result is not zero.
  • AC = 0: the low nibbles 7 + 1 = 8 produce no carry out of bit 3.
  • P = 0: 98H contains three 1s, an odd number, and the 8085 sets P only for even parity.
  • Cy = 0: 98H fits in 8 bits, so there is no carry out of bit 7.

Options B and C set Z = 1, which is impossible for a non-zero result, so neither they nor 'None of the above' fit.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.