# Logic operators in LaTeX? (XOR?)

When I google this, it seems that \XOR is how you would get an XOR symbol in LaTeX, however that is giving me the 'undefined control sequence' error. How does one get the xor symbol?

-
You probably need to load some package. However, symbols does not list \xor, so I can’t help you without knowing what the symbol looks like. Have a look at “How to look up a math symbol?” for ideas how you can easily find a particular symbol. – Caramdir Oct 9 '10 at 4:07

How about \newcommand*\xor{\mathbin{\oplus}}?

-
I think the \mathbin isn't strictly necessary because \oplus is already a binary operator. – Philipp Oct 9 '10 at 9:31

\oplus worked for me :)

I found this in List of logic symbols :P

-

I found a bit lame solution, but it works for me. Just do:

\underline{\vee}

-
what about \veebar from the mathabx package? – jon Nov 30 '11 at 16:01

What you're looking for is \veebar in amssymb.

\usepackage{amssymb}

$\veebar$


If you like, you can create a new command \lxor, named to match \lor and \land:

\providecommand{\lxor}{\veebar}

-
Hey, just added some code tags for you :) – Scott H. Oct 15 '12 at 1:18

I use this one \overline{\vee}.

-