Boolean NOT in LaTeX (\overline{A})
- LaTeX command
\overline{A}- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Bar drawn across the full width of its argument; marks Boolean NOT in logic circuits and set closure in topology.
In digital logic \overline{A} is the inverted signal, and \overline{A \cdot B} draws one continuous bar over a whole expression, which is the visual reason engineers favour it over a prefix \neg. Topologists use the same construct for the closure of a set. Compared with \bar{A}, which is a fixed-width accent meant for a single letter, \overline stretches to cover everything inside the braces. Nested negations like \overline{\overline{A}} stack cleanly. For a slightly shorter bar on single letters some authors prefer \bar; either is fine as long as you are consistent.
Also listed under: 位相・抽象数学
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Boolean NOT: $\overline{A}$
\[ \overline{\overline{A}} = A, \; \overline{A + B} = \overline{A}\,\overline{B} \]
\end{document}Related symbols
- Complement
A' - Boolean OR
A + B - De Morgan
\overline{A \cdot B} = \overline{A} + \overline{B} - Boolean AND
A \cdot B - Contradiction (falsum, bottom)
\bot - Tautology (verum, top)
\top
Frequently asked questions
- How do I write Boolean NOT in LaTeX?
- Type \overline{A} in math mode, for example $\overline{\overline{A}} = A, \; \overline{A + B} = \overline{A}\,\overline{B}$. It works in plain LaTeX without loading any package.
- Which package do I need for \overline{A}?
- None. \overline{A} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \overline{A} in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\overline{A}$ in running text.