Boolean OR in LaTeX (A + B)
- LaTeX command
A + B- Package
- No package needed: built into LaTeX
- Mode
- Text and math mode
Where it is used
Plus sign used as Boolean OR in switching algebra: the output is 1 when at least one input is 1.
Circuit designers write disjunction as A + B, so sum-of-products forms like AB + \overline{A}C read naturally. Be careful about the arithmetic meaning: in Boolean algebra 1 + 1 = 1, while in the field with two elements the plus sign means XOR and 1 + 1 = 0, which is why XOR often gets its own symbol \oplus. Logicians write the same OR as A \vee B or A \lor B. No special command is needed; the + already carries binary-operator spacing, and in long expressions you can break lines before a + inside a multline environment.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Boolean OR: $A + B$
\[ A + \overline{A} = 1, \quad A + A B = A \]
\end{document}Related symbols
- Boolean NOT
\overline{A} - Boolean AND
A \cdot B - Complement
A' - Contradiction (falsum, bottom)
\bot - De Morgan
\overline{A \cdot B} = \overline{A} + \overline{B} - Tautology (verum, top)
\top
Frequently asked questions
- How do I write Boolean OR in LaTeX?
- Type A + B in math mode, for example $A + \overline{A} = 1, \quad A + A B = A$. It works in plain LaTeX without loading any package.
- Which package do I need for A + B?
- None. A + B is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use A + B in text mode, or only in math mode?
- Both. A + B compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Pinakamahusay na AI LaTeX Editor, Alternatibo sa Overleaf
Tinutulungan ng Octree ang mga researcher mula sa 15+ na unibersidad na sumulat ng research papers nang mas mabilis gamit ang AI
- Gumawa ng magagandang TikZ diagrams gamit ang AI
- Mag-upload ng larawan at i-convert ito sa LaTeX nang walang problema
- Makakuha ng instant na tulong sa pagsulat at pag-format ng research papers