Experimental Approach
This is based on the example given by candied_orange, which I found intriguing because of its simplicity. The example was (slightly edited here):
Say I’ve got two coins. They can each take on two states (heads or tails).
Flip em both; xor
can tell you if they show different states (not-equal coin sides).
This hypothesis can be empirically verified by a scholar. The coins are physical, everyday objects, which could help to get "in touch" with the topic. Here is what can be observed, by stating the mentioned xor question:
CoinA | CoinB | XOR ("are they different?")
--------------------
heads | heads | no
tails | tails | no
heads | tails | yes
tails | heads | yes
In Boolean terms this would of course map to heads=0
, tails=1
, no=0
, yes=1
for example.
Replace "they" in the xor-question with the "coin sides" or "states" or "inputs" as it seems fitting for the explanation. Maybe it makes it clearer when talking about "are they both/all different" to underline the "exclusiveness" of xor
.
This can also (maybe later on) lead to the awareness that not xor
("not different") is the same as "equality" (==
operator) with the paraphrasing question "are they not different (=equal)?". So "all are different" and "all are same" are inverse to each other, logically.
Paraphrasing XOR
The thoughts on the subject of the insufficiency to put the meaning of xor into clear words and the suspected unsuitability of using just "or" sentences, posted by Ben I. with comments by Buffy and ctrl-alt-delor lead to the following idea:
To paraphrase the xor operation, you could use "either or" sentences. As in "Either eggs or pancakes?" But this does still not exactly cover it. To make an "exclusiveness" statement about two objects (=inputs) you need a predicate to build a decision, which was stated in the original post and by ctrl-alt-delor in the comments on another question. An example could be: "What is tastier? Either pancakes or eggs?" which optionally/implicitly should state "Pick one exclusive/single option and discard the other. "Both/All" and "None" would not be valid answers then.
One downside mentioned by Ben I. is, that the predicate of "tastier" does not yield a "true/false" nor a "yes/no" answer, but a "this or that" answer.
Taking the coin example with the "are they different" question yields the desired answer scheme in Boolean terms.
It is quite difficult to find other fitting examples. Imagine having a triangle and a disc cut from paper. The xor questions that come to mind are "Do they both have a sharp tip?", "Which is smaller? The triangle or the disc?", "Are they both made from paper?", "Are they equal?". Each must be carefully evaluated to decide if they generate suited xor statements in Boolean terms.
This can be used as reciprocal exercise to link common language questions to the xor interpretation.
To emphasize the "exclusive" character of xor, it should be made clear, that "if you chose pancakes, you do not get eggs" and vice versa, but this would be the unwanted procedural way of a selection, though.