What are the states of the Sign Carry (S) and Parity Flag (P) after executing…
2017
What are the states of the Sign Carry (S) and Parity Flag (P) after executing the following 8085 program?
MVI A, 00H MVI B, 01H SUB B
Answer: D. S=1andP=1 — The program subtracts 01H from 00H, producing FFH. FFH has the sign bit set, so S = 1, and it has eight 1-bits, so parity is even and P = 1.
- A.
S=0andP=0
- B.
S=0andP=1
- C.
S=1andP=0
- D.
S=1andP=1
Attempted by 74 students.
Show answer & explanation
Correct answer: D
The program subtracts 01H from 00H, producing FFH. FFH has the sign bit set, so S = 1, and it has eight 1-bits, so parity is even and P = 1.
Loading lesson…