The xor solution may give wrong result.
let's assume you have some flag
F1 = %0001
F2 = %0010
F3 = %0100
F4 = %1000
F = %1011 ( F1 OR F2 OR F4 )
F AND (NOT F3) = %1011
but F XOR F3 = %1111 = F OR F3 <---- WRONG - With this it includes the flag
So Fungus, sorry but your solution with XOr won't exclude/negate the Flag in question. (or did I miss something?!)
EDIT:
It'll only work when the Flag is set, so it should only used after checking (handle with care, please)