Discussion
What is the status of the carry, auxiliary carry and parity flags after executing following instructions ?
MOV A,#9C
ADD A.#64H
Answer: B
After the addition CY = 1, AC = 1 and P = 0; the paper prints the digit 1 as a letter l in this option.
The instructions load 9CH into A and add 64H:
\[ \begin{aligned} 9C_{H} &= 1001\,1100 \\ 64_{H} &= 0110\,0100 \\ \text{sum} &= 1\;0000\,0000 \end{aligned} \]
The result is 100H, so A = 00H and the carry out of bit 7 sets CY = 1. The low nibbles C + 4 = 10H, which carries out of bit 3 and sets AC = 1. The parity flag is set when A holds an odd number of 1s; 00H has none, an even count, so P = 0.
Options A and C miss the carry out of bit 7, and option D gets the parity wrong.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development