Boolean NOT in LaTeX (\overline{A})

A‾\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.

A‾‾=A,  A+B‾=A‾ B‾\overline{\overline{A}} = A, \; \overline{A + B} = \overline{A}\,\overline{B}
\documentclass{article}
\begin{document}
Boolean NOT: $\overline{A}$

\[ \overline{\overline{A}} = A, \; \overline{A + B} = \overline{A}\,\overline{B} \]
\end{document}

Related symbols

All ブール代数 →

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.
Math poweredAIでLaTeXを書く

最高のAI LaTeXエディタ、Overleaf代替

Octreeは15以上の大学の研究者がAIを使って論文をより速く書くのを支援

  • AIで美しいTikZダイアグラムを生成
  • 画像をアップロードしてシームレスにLaTeXに変換
  • 論文の執筆とフォーマットに即座にサポートを取得