We want to check if A and D are equal, and B and C are equal; if so we have a palindrome.
A $XOR$ D will return $0$ if the inputs are same.
B $XOR$ C will return $0$ if the inputs are same.
Therefore we need to check if both of those expressions are $0$, that is NOT ((A XOR D) OR (B XOR C)).