The following code
System.out.println(\"1 0 0: \" + (true ^ false ^ false)); System.out.println(\"1 0 1: \" + (true ^ false ^ true)); System.out.println(\"1 1 0:
true ^ true ^ true can be written (for understanding) as ( true ^ true ) ^ true which is true.
true ^ true ^ true
( true ^ true ) ^ true
true
If A, B, C are inputs, for the logic that you are looking for, you need something like this
(A & !B & !C) | (!A & B & !C) | (!A & !B & C)