De Morgan in LaTeX (\overline{A \cdot B} = \overline{A} + \overline{B})

A⋅B‾=A‾+B‾\overline{A \cdot B} = \overline{A} + \overline{B}
LaTeX command
\overline{A \cdot B} = \overline{A} + \overline{B}
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

De Morgan's law in Boolean notation: the complement of an AND equals the OR of the complements.

This identity lets designers convert AND-based circuits to OR-based ones and is the reason a NAND gate equals an OR gate with inverted inputs. Its dual reads \overline{A + B} = \overline{A} \cdot \overline{B}. The example shows why \overline matters: one long bar over A \cdot B visibly differs from separate bars over each letter, and that distinction is the whole content of the law. In set notation the same law is (A \cap B)^c = A^c \cup B^c, and in logic \neg(p \wedge q) \equiv \neg p \vee \neg q.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

A+B‾=A‾⋅B‾\overline{A + B} = \overline{A} \cdot \overline{B}
\documentclass{article}
\begin{document}
De Morgan: $\overline{A \cdot B} = \overline{A} + \overline{B}$

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

Related symbols

All Boolean Algebra →

Frequently asked questions

How do I write De Morgan in LaTeX?
Type \overline{A \cdot B} = \overline{A} + \overline{B} in math mode, for example $\overline{A + B} = \overline{A} \cdot \overline{B}$. It works in plain LaTeX without loading any package.
Which package do I need for \overline{A \cdot B} = \overline{A} + \overline{B}?
None. \overline{A \cdot B} = \overline{A} + \overline{B} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \overline{A \cdot B} = \overline{A} + \overline{B} in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\overline{A \cdot B} = \overline{A} + \overline{B}$ in running text.
Math poweredSumulat ng LaTeX gamit ang AI

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