1) if(!A != !B) {// code here}
2) a ? !b : b
3) return (a + b) % 2;
https://stackoverflow.com/questions/1596668/logical-xor-operator-in-c