PF is a parity flag that signifies bit parity in the low byte. So if the resulting number of bits is even, it's set. If the number of bits are odd, it's not set.
The wiki text is a bit confusing, but what the BitWiseXorNor
function logically looks like is...
bool bwxnor(bool b0, bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7) {
return ~(((((((b0 ^ b1) ^ b2) ^ b3) ^ b4) ^ b5) ^ b6) ^ b7)
}
Another way to think of PF is 1 - (sum(temp[0:7]) % 2)
.