\veebar xor (vee with bar) (⊻) in LaTeX

Command\veebar
Modemath
Packageamssymb
Unicode⊻ U+22BB
KindBinary operators

\veebar typesets the symbol “xor (vee with bar)” (⊻). It is a binary operator.

Try it

p⊻qp \veebar q

Open this formula in the editor The preview is drawn in your browser by KaTeX, which knows the common math commands. The editor compiles the formula with pdfTeX.

Example

\documentclass{article}
\usepackage{amssymb}
\begin{document}
\( p \veebar q \)
\end{document}

Open in the editor

Compiled with pdfLaTeX from TeX Live 2023.

How to use it

\veebar works only in math mode. In running text, put it between $...$ or \(...\). Outside math mode LaTeX stops with Missing $ inserted. The command comes from the amssymb package. Add \usepackage{amssymb} to the preamble. Without it LaTeX reports Undefined control sequence.

About binary operators

A binary operator stands between two operands, as in a + b. LaTeX puts a medium space on both sides of it. At the start of a formula or after another operator the same symbol counts as a sign and gets no space.

More binary operators

All binary operators