NAND in LaTeX (\barwedge)
- LaTeX command
\barwedge- Package
- Add to your preamble:
\usepackage{amssymb} - Mode
- Math mode only
- Copy the Unicode character
- ⊼
U+22BC
Where it is used
Wedge with a bar above it, used as the NAND (Sheffer stroke) connective: true unless both inputs are true.
NAND is functionally complete, so every Boolean function can be built from p \barwedge q alone, and digital designers use it for exactly that reason. Logicians also write the Sheffer stroke as a vertical bar, p \mid q or p \uparrow q, so state your notation once. \barwedge is a binary operator, giving medium spacing on each side. Do not mix it up with \veebar, which has the bar beneath a vee and usually denotes exclusive or, or with \doublebarwedge, which carries two bars. Its truth table is the complement of \wedge.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\usepackage{amssymb}
\begin{document}
NAND: $\barwedge$
\[ p \barwedge q \equiv \neg (p \wedge q) \]
\end{document}Related symbols
- NOR operator (bar over vee)
\bar{\vee} - Direct Sum
\oplus - Circle Dot
\odot - Negation
\neg - Right Arrow (Double)
\Rightarrow - Logical Or
\lor
Frequently asked questions
- How do I write NAND in LaTeX?
- Type \barwedge in math mode, for example $p \barwedge q \equiv \neg (p \wedge q)$. Load amssymb first with \usepackage{amssymb}.
- Which package do I need for \barwedge?
- \barwedge needs amssymb: add \usepackage{amssymb} to your preamble before the document starts.
- Can I use \barwedge in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\barwedge$ in running text. If you only need the glyph in text, paste the Unicode character ⊼ instead (with XeLaTeX or LuaLaTeX and a font that has it).
최고의 AI LaTeX 편집기, Overleaf 대안
Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움
- AI로 아름다운 TikZ 다이어그램 생성
- 이미지를 업로드하고 LaTeX로 원활하게 변환
- 논문 작성 및 서식에 대한 즉각적인 지원 받기