·AND · U+00B7. Middle dot. Alt+250, · in HTML, \cdot in LaTeX.
∧AND · U+2227. Logical and. ∧ in HTML, \wedge in LaTeX.
AND: 00→0 01→0 10→0 11→1Output column 0 0 0 1.
AND truth tableTwo inputs, one output.
A,B ─[ & ]─ QAND gate on one line
AND gate, box& marks AND.
AND gate, outlineThe distinctive shape, in keyboard characters.
OR
A ∨ BOR, as in logic
A | BOR, in code, bit by bit
∨OR · U+2228. Logical or. ∨ in HTML, \vee in LaTeX.
OR: 00→0 01→1 10→1 11→1Output column 0 1 1 1.
OR truth tableTwo inputs, one output.
A,B ─[≥1]─ QOR gate on one line
OR gate, box≥1: at least one input is 1.
OR gate, outlineThe distinctive shape, in keyboard characters.
NOT
A′NOT, with a prime
A̅NOT, with an overline
NOT ANOT, as a word
~ANOT, in code, bit by bit
¬NOT · U+00AC. Not sign. Alt+170, ¬ in HTML, \neg in LaTeX.
NOT: 0→1 1→0Output column 1 0.
A ─[ 1 ]o─ QNOT gate on one line
NOT gate, box1 marks a single input, and the o is the bubble.
NOT gate, outlineA triangle with a bubble, in keyboard characters.
NAND
¬(A · B)NAND, as NOT of AND
(A · B)′NAND, with a prime
A ↑ BNAND, with the Sheffer stroke as an arrow
¬A + ¬BNAND, as OR of two NOTs
⊼NAND · U+22BC. Nand. \barwedge in LaTeX with amssymb.
NAND: 00→1 01→1 10→1 11→0Output column 1 1 1 0.
NAND truth tableTwo inputs, one output.
A,B ─[ & ]o─ QNAND gate on one line
NAND gate, box& marks AND. The o is the bubble.
NAND gate, outlineThe distinctive shape, in keyboard characters.
NOR
¬(A + B)NOR, as NOT of OR
(A + B)′NOR, with a prime
A ↓ BNOR, with a down arrow
¬A · ¬BNOR, as AND of two NOTs
⊽NOR · U+22BD. Nor. ⊽ in HTML.
NOR: 00→1 01→0 10→0 11→0Output column 1 0 0 0.
NOR truth tableTwo inputs, one output.
A,B ─[≥1]o─ QNOR gate on one line
NOR gate, box≥1: at least one input is 1. The o is the bubble.
NOR gate, outlineThe distinctive shape, in keyboard characters.
XOR
A ⊻ BXOR, as in logic
A ^ BXOR, in code, bit by bit
A·¬B + ¬A·BXOR, from AND, OR and NOT
⊕XOR · U+2295. Circled plus. ⊕ in HTML, \oplus in LaTeX.
XOR: 00→0 01→1 10→1 11→0Output column 0 1 1 0.
XOR truth tableTwo inputs, one output.
A,B ─[=1]─ QXOR gate on one line
XOR gate, box=1: exactly one input is 1.
XOR gate, outlineThe distinctive shape, in keyboard characters.
XNOR
¬(A ⊕ B)XNOR, as NOT of XOR
(A ⊕ B)′XNOR, with a prime
A ↔ BXNOR, as if and only if
A·B + ¬A·¬BXNOR, from AND, OR and NOT
⊙XNOR · U+2299. Circled dot operator. ⊙ in HTML, \odot in LaTeX.
XNOR: 00→1 01→0 10→0 11→1Output column 1 0 0 1.
XNOR truth tableTwo inputs, one output.
A,B ─[=1]o─ QXNOR gate on one line
XNOR gate, box=1: exactly one input is 1. The o is the bubble.
XNOR gate, outlineThe distinctive shape, in keyboard characters.
IMPLY, NIMPLY and the buffer
A → BIMPLY, the same as ¬A + B
A · ¬BNIMPLY, the same as ¬(A → B)
Q = ABuffer, the value unchanged
Truth tables
Truth table of six gatesSix gates side by side, in a font where every character has one width.
LaTeX
A \cdot BAND in LaTeX
\overline{A}NOT in LaTeX
\overline{A \cdot B}NAND in LaTeX
\overline{A + B}NOR in LaTeX
A \oplus BXOR in LaTeX
A \odot BXNOR in LaTeX
\overline{A \oplus B}XNOR in LaTeX, as NOT of XOR
Gates in one character
U+1CC15. Logic gate or. Unicode 16.0. An empty box where no font has it.
U+1CC16. Logic gate and. Unicode 16.0. An empty box where no font has it.
U+1CC17. Logic gate inverted inputs. Unicode 16.0. An empty box where no font has it.
U+1CC18. Logic gate inverted output. Unicode 16.0. An empty box where no font has it.
U+1CC19. Logic gate buffer. Unicode 16.0. An empty box where no font has it.
U+1CC1A. Logic gate buffer with inverted input. Unicode 16.0. An empty box where no font has it.
How this list was compiled: The seven gates, their Boolean expressions, the bubble, the two sets of outlines and the truth tables are from en.wikipedia.org, whose comparison table every row here was checked against; the ampersand from en.wikipedia.org, the caret from en.wikipedia.org, the sums of products from that article and en.wikipedia.org, OR of two NOTs from en.wikipedia.org. What &, ≥1, =1, 1 and the bubble stand for in a box: Overview of IEEE Standard 91-1984, Texas Instruments, 1996 (ti.com), table 1 and table 2. Characters, names, the block and the version are from UnicodeData.txt, Blocks.txt and DerivedAge.txt, version 18.0.0 (unicode.org). Alt codes are from the code page 437 table (unicode.org), HTML names from html.spec.whatwg.org, LaTeX macros from LaTeX’s fontdef.dtx (github.com) and amssymb (ctan.org), as this site keeps them. Read on November 29, 2026. The drawings, the one-line gates and the order are this page’s own. License: own work for the selection, drawings, order and notes; facts from the Unicode Character Database (Unicode License v3, unicode.org) and from Wikipedia, CC BY-SA 4.0, in our own words
How it works
The gate symbols of an expression are · for AND, + for OR, ¬ for NOT, ⊼ for NAND, ⊽ for NOR, ⊕ for XOR and ⊙ for XNOR. The outlines of a diagram are drawn in plain text.
Read the full guide
Outline or box
Diagrams draw gate symbols in one of two ways. In the distinctive set, unofficially the military one, the outline tells the gate. In the rectangular set every gate is the same box and a mark tells it: & for AND, ≥1 for OR, =1 for XOR, 1 for a single input. A small circle at the output, the bubble, negates: it turns AND into NAND and OR into NOR.
Keep a drawing in line
A gate of several lines needs a font where all characters have one width, such as a code block. Gates on one line have nothing to line up, and neither have the truth rows.
Questions and answers
What is the symbol for XOR?
⊕ in Boolean algebra and ⊻ in logic. C and many languages after it write ^, which works bit by bit.
How do you write NAND and NOR?
As AND or OR under one long bar. In plain text ¬(A · B), (A · B)′ and A ⊼ B say NAND, and ¬(A + B), (A + B)′ and A ⊽ B say NOR. In LaTeX the bar is \overline.
What is the NOT gate symbol?
A triangle with a bubble at its tip, also called an inverter. In the rectangular set it is a box with a 1 and a bubble.
Are there Unicode characters for logic gates?
Six, since Unicode 16.0: U+1CC15 to U+1CC1A, in Symbols for Legacy Computing Supplement. They include Logic gate and and Logic gate or. None is a whole NAND, and without a font for the block they are empty boxes.