What is the purpose of zero (z) flag and carry (c) flag?
Carry flag holds the carry after addition or the borrow after subtraction. Carry flag also indicates error conditions, as dictated by some procedures andprograms.
Zero flag indicates that result of a logical or arithmetic operation is zero.
If Z=1, result is zero; if Z=0, result is not zero.