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 poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث