Talk:Exclusive or

message: At least in the introduction, it would be helpful (even to eggheads) to emphasize the basics.  xor (exclusive disjunction) means not-equal, reminding the reader that the simplest base notion is actually equality (logical biconditional).  Given that, "neq" or somesuch would be a better name, and ≠ or similar would be a better symbol, but neither is likely to change.  Dang, those formal names are too long to type twice in one day.
Thunkapedia (talk) 17:19, 8 March 2022 (UTC)
thread_title:  Back to basics 

message: I think the computer science section should mention some of the common properties of the XOR operation as it applies to binary calculations.
e.g., where A and B are two arbitrary binary digits (0 or 1)
    if XOR(A,B) = C, then XOR(B,A) = C; commutativity
    if XOR( XOR(A,B), C ) = D, then XOR( A, XOR(B, C) ) = D; associativity    
    and XOR(A,A) = 0 and if XOR(A,B) = C, then XOR(A,C) = B and XOR(C,B) = A; a binary string is its own inverse (logic)
That is to say, the XOR operation is commutative (it doesn't matter what order the operands are passed to the function), is associative (it doesn't matter how multiple operands are grouped), and binary strings passed to it are their own inverses with respect to XOR.
I'll add this into the page sometime in the next week or two, unless someone objects. Let me know of any flaws/improvements!
Jthechemist (talk) 23:21, 13 May 2010 (UTC)
replies: text: There's an inherent assumption that XOR of 3 or more bits is parity (chained XOR), instead of the English description of exclusive 'just one is true'.  Not sure if this should be added to the article in case someone comes across both conventions.  73.181.82.26 (talk) 08:49, 29 September 2015 (UTC)
replies: text: I've never seen "just one true" called XOR. That operation is not associative, so it can't be computed one pair at a time, among other reasons for being less used. Mentioning it here would require a reliable source. —David Eppstein (talk) 15:40, 29 September 2015 (UTC)
thread_title:  Properties of XOR Operation (in the Computer Science section) 

message: I propose dropping the proof of ¬(p^q) ^ (pvq) because it is easy to prove it exhaustively using the truth table. Much easier than to follow the first step of the provided proof.
Sweavo (talk) 12:35, 7 January 2011 (UTC)
thread_title:  Proof unhelpful 

message: xor is communicative and associative.  false xor p is p, for any formula p.  p xor p is false for any formula p.  Thus (if xor is distributive over itself):
 p xor (q xor r)
 is (p xor q) xor (p xor r)
 is (p xor q xor p xor r)
 is (p xor p xor q xor r)
 is (false xor (q xor r))
 is (q xor r).
p xor (q xor r) is NOT (q xor r).  Proof by Counter Example:
p := true
q := false
r := true
p xor (q xor r) is true xor (false xor true) is true xor true is false.
q xor r is true.
xor is NOT distributive over itself.
--Xor logician (talk) 04:45, 14 September 2011 (UTC)
replies: text: The other way around: and distributes over xor. Thanks for catching this. —David Eppstein (talk) 16:53, 17 May 2012 (UTC)
thread_title:  Distributivity over Exclusive Or 

message: "(Note: If the waiter intends that choosing neither tea nor coffee is an option i.e. ordering nothing, the appropriate operator is NAND: p NAND q.)[dubious – discuss]"
I don't think this is accurate, even if coffee AND tea is disallowed. The customer *may* order coffee XOR tea. The customer *must* order coffee NAND tea. The fact that the may construction was used just beforehand makes this confusing, if the reader assumes that construction is how the waiter is expressing themself once more. Samineru (talk) 21:16, 4 January 2016 (UTC)
thread_title:  Dumb Waiter 

message: Should mention that:
X xor 1 = not(X)
X xor 0 = X
--Volibon (talk) 18:52, 14 March 2016 (UTC)
thread_title:  Something is missing 

message: In some cases, we want to use arithmetic representation for logic express. For the case of exclusive or, we have 
: xor(a,b)=a+b-2*a*b;
Jackzhp (talk) 05:53, 15 April 2016 (UTC)
thread_title: arithmetic representation

message: The term appears both hyphenated and not in the article. Should the article be consistent here? If so, which is it?  — Preceding unsigned comment added by 147.210.246.189 (talk) 12:35, 5 July 2016 (UTC)
thread_title:  "exclusive or" vs. "exclusive-or" 

message: In the section "Equivalences, elimination, and introduction" the example, "For example, if two horses are racing, then one of the two will win the race, but not both of them." This doesn't strike me as analogous to xor logic (but on the right track). Basically, it's more like "if two horses are in a race, then one of them will one if they are proven different, but neither will win if they are equivalent." I almost just edited directly without talk being confident (in terms of logic) about the change and it being minor, but then realized that I've had a super long day and am super ineloquent. Can someone reword my example and edit maybe? Most notable is I'm poorly representing "equivalent" vs "unequivalent" as "faster" vs "same speed" and the phrasing is a mess. 2001:558:6012:51:31C7:8365:79FA:2F43 (talk) 06:07, 16 December 2016 (UTC)
replies: text: Fast post-thought, even better is describing that if one wins, then the race is deemed resolved with a winner, vs neither win, the race is deemed resolved with no winner (the actual output here is "do we have a winner?" rather than the horse that won)... I'm tired. You get the idea here. Someone with some language skills bail me out please and make Wikipedia better one sentence change at a time. 2001:558:6012:51:31C7:8365:79FA:2F43 (talk) 06:14, 16 December 2016 (UTC)

text: It is error example. "For example, if three horses are racing, then one of the two will win the race, but not all of them." It is not 3-XOR. 3-XOR has output one, if everything 3 input have one. --Voproshatel (talk) 12:45, 18 October 2022 (UTC)
thread_title:  Example Given

message: Apparently my account isn't active enough to be able to edit semi-protected pages. I propose linking Linearly Separable, because it's specific to Neural Nets which creates a domain-specific definition. DazzleNovak (talk) 20:05, 16 February 2017 (UTC)
thread_title:  Minor Edit: Linearly Seperable 

message: The Computer Science section, subsection "Bitwise operation", currently contains the following sentence (as of Thurs, June 15 2017):
As noted above, since exclusive disjunction is identical to addition modulo 2, the bitwise exclusive disjunction of two n-bit strings is identical to the standard vector of addition in the vector space (\Z/2\Z)^n.
More accurately, I believe it should say:
As noted above, since exclusive disjunction of 2 bits is identical to addition modulo 2, the bitwise exclusive disjunction of two n-bit strings is identical to the standard vector of addition in the vector space (\Z/2\Z)^n.
Or perhaps even:
As noted above, since exclusive disjunction of two 1-bit numbers is identical to addition modulo 2, the bitwise exclusive disjunction of two n-bit strings is identical to the standard vector of addition in the vector space (\Z/2\Z)^n.
I realize that the second part of the sentence in the current article (somewhat) implies my suggested addition, but if one only reads the first part of the current version's sentence alone, it is ambiguous and technically incorrect for most pairs of multi-bit numbers. Thoughts? Too minor to stress about?
P.S I would have made the edit myself (maybe) but the page is semi-protected, and I am a very beginner wiki-newbie. Actually now that I think about it, that's probably for the best :P Sorry if I butchered any syntax or etiquette for this talk entry!
--BetaDuck (talk) 07:51, 15 June 2017 (UTC)
thread_title:  Bitwise Operation Section- Slight Clarification (Minor Edit Suggestion) 

message: It is wrong that "... o ..." always is exclusive. It can be. But most often it is used in an inclusive way. On the other hand, "o ... o ..." is always used as exclusive (like "either ... or ..." in English).
At least, this is how it is used in Spain. Mamue81 (talk)
:Yes, I think this is how it is used in all Spanish speaking countries. Why is Spanish even mentioned? I don't see how Spanish disjunctions function differently from the English ones. "o"="or", "o...o"="either...or". --92.214.199.65 (talk) 19:59, 5 May 2018 (UTC)
replies: text:  I don't think it is true that there are no sentences where the "or" is inclusive, at least in Spanish. For instance, in the sentence "you can have a discount in your cinema ticket if you are underage or disabled", both given possibilities might occur and the person would still have the ticket discount. --Benjavalero (talk) 09:21, 18 November 2019 (UTC)
thread_title:  Spanish "... o ..." vs "o ... o ..." 

message: The English usage section is rather inconclusive and unsatisfying.  It would be much better to mention languages which have a word specifically meaning "exclusive or", like aut in Latin, as seen in such quotes or proverbs as Aut vincere aut mori "Conquer or die!" and Aut Caesar aut nullus "Caesar or nobody!"  (In such sentences, the first aut is added for rhetorical emphasis, but the basic meaning would be the same even if it were omitted...) -- AnonMoos (talk) 02:10, 22 April 2018 (UTC)
thread_title:  English section vs. Latin 

message: 2405:205:4227:1961:B1DA:B0D2:486E:4113 (talk) 16:59, 8 August 2018 (UTC)
replies: text: Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate. LittlePuppers (talk) 17:56, 8 August 2018 (UTC)
thread_title:  Semi-protected edit request on 8 August 2018 

message: Please remove this part: "Even so, there is good reason to suppose that this sort of sentence is not disjunctive at all. If all we know about some disjunction is that it is true overall, we cannot be sure which of its disjuncts is true. For example, if a woman has been told that her friend is either at the snack bar or on the tennis court, she cannot validly infer that he is on the tennis court. But if her waiter tells her that she may have coffee or she may have tea, she can validly infer that she may have tea. Nothing classically thought of as a disjunction has this property. This is so even given that she might reasonably take her waiter as having denied her the possibility of having both coffee and tea."  
The differences between the two examples have nothing to do with or.  It's the fact that the conditional "may" is used.  If a woman has been told that her friend may either be at the snack bar or may be on the tennis court, she can infer that he may be on the tennis court.
Myfirstnameisdanger (talk) 19:46, 7 August 2019 (UTC)
replies: text: Done Implicit consensus since no one has objected and the citation needed tag.  --Trialpears (talk) 23:25, 13 August 2019 (UTC)
replies: text: In case anyone's still reading, this was an example of a free choice inference for which "or" is very much one of the culprits. I think it would be WP:UNDUE to include free choice in the article at the present moment (given all the other important things that aren't mentioned) but it would belong in a future more developed version. Botterweg14 (talk) 22:01, 11 February 2021 (UTC)
thread_title:  Disjunction: Waiter v Tennis Example 

message: The system of symbolic logic notation used on this page, with right angle thingies for negation, Vees for "OR", and carats for "AND" is not the only one.  What is it called?  Is it the most common notation?  If not, what is the most common notation?  If I wanted to write out a statement of logic on a sign or a T-shirt and have it be recognized by as many geeks as possible, which system of notation should I use? Pciszek (talk) 14:44, 6 June 2020 (UTC)
thread_title:  What is the system symbolic logic notation used on this page called? 

message: Under the section 'Exclusive "or" in natural language', the former should be changed to the latter:
The English example below would normally be understood in conversation as implying that Mary is not both patriotic and quixotic.
The English example below would normally be understood in conversation as implying that Mary is not both a singer and a poet.
User:Botterweg14's initial draft of this addition used "patriotic and quixotic" as the example, but when this was later changed to "singer and poet", the line above wasn't modified to match. Baitrak (talk) 16:03, 6 April 2021 (UTC)
replies: text: Done RudolfRed (talk) 17:24, 6 April 2021 (UTC)

text: Just so you're aware, your account is now autoconfirmed, meaning that you can edit confirmed protected pages without needing to create an edit request anymore. Sincerely, Deauthorized. (talk) 17:30, 6 April 2021 (UTC)
thread_title:  Semi-protected edit request on 6 April 2021 

message: The sentence "Mary is either a singer or a poet or both." in section Exclusive or in natural language indicates that „either – or” usually indicates an alternative. This is also what one finds in dictionaries; see e.g. . In the Oxford English Dictionary, "either – or" is mentioned in the entry of "either" under "II. Expressing alternatives. 3. In correlative constructions with a conjunction, introducing the mention of alternatives." From this and the article here, my understanding is that in everyday-speech in the absence of negation, it indeed always indicates an alternative.
For me, so far this indicated that in English texts on mathematics and logic “either – or” should be read as exclusive or. I noticed that sometimes “either – or” is used when inclusive or is meant, but I always thought that in such a case the author was just careless and “either” should be deleted.
After I did indeed delete an occurrence of “either” in an article on a mathematical topic for the stated reason, another user and I had a discussion on the use of “either – or” (see User_talk:TakuyaMurata#On "either ... or"). With the discussion, I have now learned that it is not the case that “either – or” means exclusive or, or at least that this interpretation of “either – or” is not generally accepted.
My counterpart in the discussion referred me to this document in which it is unambiguously stated that "either - or" should mean inclusive or in mathematical writing:  I also found this article in the field of logic: . Here "principle 3" indicates the same, that is, “either – or” should simply mean 'or', that is, inclusive or.
But I have not found an authoritative source on the question whether “either – or” in mathematics and logic should be interpreted as inclusive or exclusive 'or' or that it might have both meanings.
Of course, “either” by itself can have a meaning in the direction of “any”. This is, for example, the case in “in either case” or “either way” and also in “Suppose either (one) of the following conditions is satisfied”. This does by itself, however, not mean that “either – or” does not have the specific meaning of exclusive or in mathematics and logic. As stated, this is what I thought.
I also mention that my mother tongue is German, and in German we have the expression “entweder – oder”, which means exclusive or and nothing else. So, as “soit – soit” in French, this is a persistent XOR-construction.
To clarify this question and as a reference for further discussions in this topic here in Wikipedia, I would like to suggest that there should be a section in the present article on the use of “either – or” in texts on mathematics and logic. However, for this first a good source should be found. This might be complemented with statements on expressions in other languages like “soit – soit” in French and “entweder – oder” in German. Claus aus Leipzig (talk) 17:11, 19 March 2023 (UTC)
thread_title:  On the expression "either – or" in mathematical texts