This article is rated C-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
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)
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)
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)
The page for XOR Swap does not indicate the following sentence: "using the XOR swap algorithm; however this is regarded as more of a curiosity and not encouraged in practice." "In practice" seems to be an opinion of the author of that statement and doesn't follow from the body of knowledge (nor it is cited). Revenge by someone couldn't answer it on an interview question? :) Freakdog ( talk) 02:45, 10 September 2011 (UTC)
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)
Didn't really know where to put this... the article says XOR isn't distributive over any binary operator, but it is distributive over logical AND, isn't it? -- 87.183.89.195 ( talk) 16:01, 17 May 2012 (UTC)
If I were to say "you can have cake or pie or chocolate", I'm implying that you can't have all three. How do I represent that? XOR disallows you to have 2 desserts at the same time, but technically allows you to have all 3. What logical operation can be used to match my linguistic intentions (you can only have 1 of 3 desserts)? Jigen III ( talk) 23:56, 26 January 2015 (UTC)
"(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)
Should mention that:
X xor 1 = not(X)
X xor 0 = X
-- Volibon ( talk) 18:52, 14 March 2016 (UTC)
In some cases, we want to use arithmetic representation for logic express. For the case of exclusive or, we have
Jackzhp ( talk) 05:53, 15 April 2016 (UTC)
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)
This sentence: "If all we know about some disjunction is that it is true overall, we cannot be sure that either of its disjuncts is true" is false. We know for certain one or both disjuncts is true if OR or XOR evaluates to true. Changed to "...we cannot be sure which of its disjuncts is true", which is in fact the case. — Preceding unsigned comment added by Bholleman ( talk • contribs) 04:44, 2 January 2017 (UTC)
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)
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)
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 .
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 .
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 .
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)
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)
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)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
2405:205:4227:1961:B1DA:B0D2:486E:4113 ( talk) 16:59, 8 August 2018 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
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)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
Mary example is error. "Mary is a singer or a poet or a dancer" is not 3-XOR. -- Voproshatel ( talk) 12:49, 18 October 2022 (UTC)
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. [1]. 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: [2] I also found this article in the field of logic: [3]. 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)
What is the identity element of this group? 181.209.152.189 ( talk) 00:33, 17 April 2024 (UTC)