In writing a paper or thesis, is it a sign of bad style to use xor in your text as a word having the logical meaning of exclusive or? Or should you always avoid:

.. xor ..

by writing something like:

either .. or ..


closed as primarily opinion-based by Najib Idrissi, Joey Zou, Joel Reyes Noche, user91500, Cyclohexanol. Sep 9 '16 at 6:37

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 7
    $\begingroup$ The "English" (or your country's language) part of the thesis should (imo) be as easy to read as possible. It should be written using standard, common language. The word "xor" should be avoided. $\endgroup$ – Antonio Vargas Sep 5 '16 at 14:44
  • 12
    $\begingroup$ At risk of turning this into an English Language and Usage question, you should not say "either ... or ..." for exclusive or. You should say "either ... or ... but not both". When someone says "you're either a fool or a liar" they don't mean you can't possibly be both, they mean that they've thought about the two main cases separately. $\endgroup$ – Steve Jessop Sep 5 '16 at 16:07
  • 1
    $\begingroup$ Iff you write this you might also use "xor". But don't do it for your own convenience. If and where it benefits the reader it might be ok. But better just don't. $\endgroup$ – JimmyB Sep 5 '16 at 17:15
  • 3
    $\begingroup$ In some contexts I prefer "exactly one of the following is true: ..." $\endgroup$ – Vladimir Reshetnikov Sep 5 '16 at 19:25
  • 2
    $\begingroup$ @HagenvonEitzen: and yet the usage example in the the dictionary includes it :-) I'm not a lexicographer, but my impression as a speaker is that saying "either ... or" doesn't always rule out both, it merely indicates that both together aren't really being considered. If I say, "you can either have tea or coffee" then that certainly means you aren't being offered both, but if someone asks "did you get either a tea or a coffee" and I had both and am required to give a yes/no answer then I think I'd say "yes" rather than "no". $\endgroup$ – Steve Jessop Sep 5 '16 at 21:46

You are writing an article in English. Therefore, sentences should only contain correct English words, and not some combination of terms you would use in formulas and normal English words. Therefore, I would strongly recommend to use

either ... or ...

Also, if you are using XOR, you should write it in all-caps (Sources: Oxford Dictionary, Merriam-Webster) which makes it less attractive to read it in most sentences.

  • 3
    $\begingroup$ I agree with the gist of this answer, but I note that mathematicians often use natural language in "incorrect" ways. I think that conforming to "correct" English should be more a general guideline than a hard-and-fast rule. $\endgroup$ – Nefertiti Sep 5 '16 at 15:00
  • 1
    $\begingroup$ If you use it in an English sentence, and people understand what you mean, it's a "correct English word". Mathematicians write 'iff' in sentences all the time, why not 'xor'? I am sure if you read CS papers, you will even find 'xor' used as a verb. $\endgroup$ – Robin Ekman Sep 5 '16 at 15:37
  • 6
    $\begingroup$ @RobinEkman I'm not sure "iff" is really all that prevalent outside of blackboards and scratch paper - which are both contexts in which writing is not meant to stand alone as a means of communication. I don't have a good feel of the overall literature, but lots of the textbooks I've read never use the term, even though "if and only if" shows up all the time. $\endgroup$ – Milo Brandt Sep 5 '16 at 16:07
  • 5
    $\begingroup$ I think this answer is mostly on-target, but needs to augmented with @SteveJessop's suggestion to add "but not both." Otherwise, you're not communicating XOR but merely OR. If you don't care about the difference, ignore this suggestion. $\endgroup$ – LarsH Sep 5 '16 at 16:14
  • $\begingroup$ Why not simply write 'exclusively ... or ...', being true to both English and the original thought. $\endgroup$ – Chris Hatton Sep 5 '16 at 23:58

It also depends on the topic you write thesis upon. Including logical operations like XOR or maybe some tedious mathematical notations in a thesis on biology or medical sciences might put the targeted audience in a fix at times. Therefore avoiding these terms and replacing them with simple English might make it convenient for wider audience.


My personal preference is to read English words in complete sentences rather than logical reasoning written out in formula-like style. I always have to translate the latter into the former.

I feel the same way about $$ \sum_{n=1}^\infty f(n) $$ which I always rewrite as $$ f(1) + f(2) + \cdots , $$ so I can see how the terms change.

  • 4
    $\begingroup$ The former is better for manipulation, the latter for readability and conceptualization. I think context matters. $\endgroup$ – abnry Sep 5 '16 at 16:31
  • 9
    $\begingroup$ Are you also surprised by the upvotes for your personal preferences? If not, what's the precise difference? Voting on this answers likely means a form of endorsement or agreement (or the opposite) with the sentiment expressed and the (implied) suggestion to do as outlined in this answer. |I am somewhat indifferent and thus did not vote at all.] Arguably one could also vote in a "thanks for sharing" sense, but it might be more useful to have the votes reflect argreement with the idea rather than an evaluation of the interest of shared opinion. $\endgroup$ – quid Sep 5 '16 at 17:58
  • 1
    $\begingroup$ @quid Now that you mention it, maybe the upvotes are odd too. I might upvote someone else's opinion on a question if I thought it might help the OP, even if I disagreed. Of course I've no idea whether that's what the votes on this answer mean. Probably not worth carrying the discussion any further. $\endgroup$ – Ethan Bolker Sep 5 '16 at 18:02
  • 1
    $\begingroup$ Yes, I agree. I had added in a sentence in this sense while your comment appeared. $\endgroup$ – quid Sep 5 '16 at 18:04
  • 1
    $\begingroup$ Actually as reader I prefer the sum sign form. It leaves no doubt as what is meant, while the "dots form" can introduce ambiguities. $\endgroup$ – celtschk Sep 5 '16 at 23:11

Either you are writing a formula, in which case xor as an operator might be acceptable (but consider \otimes or some such if speaking in a mathematical framework) OR you are writing text, in which case you should use a textual form, which xor is not. The string xor might be used informally to refer to exclusive-or, but not in formal writing.

Both of these cases cannot be true; they are exclusive.

Note particularly that if you are writing a thesis or article, then you have two goals. One is to communicate as clearly as possible. Another goal is to demonstrate that you can write well and use the language well. It isn't necessarily clear that using xor instead of more traditional forms is more or less clear (it will certainly be less clear for some readers), but it is absolutely certain that using a non-standard word like xor will do yourself a serious disservice with at least somebody you want to impress.

Don't kid yourself by pretending that a thesis is entirely about communication of some novel and great idea. It is also about selling your idea as widely as possible and possibly about selling yourself as well. Anybody who decides that you are an illiterate boob who prefers jargon to clear language is much less likely to take your ideas seriously. As you can see from the comments here, there are at least some people who think that using xor is incorrect usage in text. Did you really want to have those people take your ideas less seriously?


(I don't know why this has a downvote, but I sure you it is correct.)

Yes, it's a very bad idea - but not just because it reads awkwardly. From a strictly logical standpoint, xor is really just the wrong tool. For example, consider the...

Trichotomy Axiom (Plain English). If $x$ and $y$ are real numbers, then precisely one of the following holds. $$x<y, \quad x=y, \quad x>y$$

As it turns out, the following statement, while true, actually fails to correctly formalize the above axiom.

Incorrect Formalization (Symbolic). If $x$ and $y$ are real numbers, then: $$(x<y)+(x=y)+(x>y).$$

(Where $+$ means xor).

The correct formalization is:

Trichotomy Axiom (Symbolic). If $x$ and $y$ are real numbers, then: $$[x<y]+[x=y]+[x>y]=1$$

(Where $[\Box]$ is the Iverson bracket and $+$ means the usual notion of addition on $\mathbb{N}$.)

To see the problem with with incorrect formalization, observe that for all booleans $A$,$B$ and $C$, we have:

$$A+B+C \iff [A]+[B]+[C] \in \{1,3\}$$

This can be checked by looking at 4 cases:

  • $A,B,C$ all false.
  • $A,B$ false, $C$ true
  • $A$ false, $B,C$ true
  • all true

What this tells us is that the Plain English meaning of the incorrect formalization is:

Incorrect Formalization (Plain English). If $x$ and $y$ are real numbers, then either one or all three of the following are true: $$x<y, \quad x=y, \quad x>y$$

But of course, this doesn't agree with the Trichotomy axiom we started with, which in turn proves that the incorrect symbolic formalization is indeed exactly that - incorrect.


Not the answer you're looking for? Browse other questions tagged or ask your own question.