- A+

Category：Languages

I want to simplify this condition where a and b are booleans

`!((a && b) || (!a && !b)) `

I have tried using the truth table generator, but I am not able to figure out the simplified version.

This can be simplified as a `XOR`

(exclusive or). It's equivalent to `(a && !b) || (!a && b)`

.

In Java, it can be achieved as `a ^ b`