Quote: "I guess there must be some clever algorithms setting all three flags to prevent every calculation being overburdened with the checks you aren't interested in."
(useless trivia)
Back in the old days, the cpu performed a passive subtract operation - passive in that the result is not used - which set flag bits based on the (imaginary) result;
- The Zero bit - if the 2 numbers were equal
- The Minus bit - if the second number was larger
These 2 bits were then used for four branch operations;
- Branch if Equal (branches when zero bit set)
- Branch if Not Equal (branches when zero bit clear)
- Branch if less than (branches when Minus bit set)
- Branch if greater than (branches when both bits clear)
There were other flags such the overflow bit and the carry bit to add to the mix, but I've bored you enough already