Electronics Reference

Logic Gate Symbols and Truth Tables

Chart of AND, OR, NOT, NAND, NOR, XOR, XNOR and buffer symbols in ANSI/IEEE and IEC styles, with Boolean expressions, truth tables, PNG, SVG and print.

ANSI / IEEE 91 and IEC 60617-12 symbols side by sideBoolean expression and computed truth table for every gateSVG and PNG download for each symbolPrintable one-page chart, no sign-up

Try the inputs

Set A and B once. Every card below highlights the matching truth table row and shows the output.

NOT and BUFFER have one input and use A only.

AND gate

Output: 1 only if all inputs are 1

AND gate, ANSI / IEEE 91 symbolABY

ANSI / IEEE 91

AND gate, IEC 60617-12 symbol&ABY

IEC 60617-12

Boolean expression

  • Y = A · B
  • Y = AB
  • Y = A AND B

With the inputs above, Y = 0

AND gate truth table
ABY
000
010
100
111

OR gate

Output: 1 if any input is 1

OR gate, ANSI / IEEE 91 symbolABY

ANSI / IEEE 91

OR gate, IEC 60617-12 symbol≥1ABY

IEC 60617-12

Boolean expression

  • Y = A + B
  • Y = A OR B

With the inputs above, Y = 1

OR gate truth table
ABY
000
011
101
111

NOT gate

Output: inverts the input

NOT gate, ANSI / IEEE 91 symbolAY

ANSI / IEEE 91

NOT gate, IEC 60617-12 symbol1AY

IEC 60617-12

Boolean expression

  • Y = A′
  • Y = ¬A
  • Y = NOT A

With the inputs above, Y = 0

NOT gate truth table
AY
01
10

NAND gate

Output: 0 only if all inputs are 1

NAND gate, ANSI / IEEE 91 symbolABY

ANSI / IEEE 91

NAND gate, IEC 60617-12 symbol&ABY

IEC 60617-12

Boolean expression

  • Y = ¬(A · B)
  • Y = (A · B)′
  • Y = A′ + B′

With the inputs above, Y = 1

NAND gate truth table
ABY
001
011
101
110

NOR gate

Output: 1 only if all inputs are 0

NOR gate, ANSI / IEEE 91 symbolABY

ANSI / IEEE 91

NOR gate, IEC 60617-12 symbol≥1ABY

IEC 60617-12

Boolean expression

  • Y = ¬(A + B)
  • Y = (A + B)′
  • Y = A′ · B′

With the inputs above, Y = 0

NOR gate truth table
ABY
001
010
100
110

XOR gate

Output: 1 if the inputs differ

XOR gate, ANSI / IEEE 91 symbolABY

ANSI / IEEE 91

XOR gate, IEC 60617-12 symbol=1ABY

IEC 60617-12

Boolean expression

  • Y = A ⊕ B
  • Y = A′B + AB′

With the inputs above, Y = 1

XOR gate truth table
ABY
000
011
101
110

XNOR gate

Output: 1 if the inputs match

XNOR gate, ANSI / IEEE 91 symbolABY

ANSI / IEEE 91

XNOR gate, IEC 60617-12 symbol=1ABY

IEC 60617-12

Boolean expression

  • Y = ¬(A ⊕ B)
  • Y = AB + A′B′

With the inputs above, Y = 0

XNOR gate truth table
ABY
001
010
100
111

BUFFER gate

Output: passes the input through

BUFFER gate, ANSI / IEEE 91 symbolAY

ANSI / IEEE 91

BUFFER gate, IEC 60617-12 symbol1AY

IEC 60617-12

Boolean expression

  • Y = A

With the inputs above, Y = 1

BUFFER gate truth table
AY
00
11

Printable logic gate chart

All eight gates on one landscape page: ANSI and IEC symbols side by side, Boolean expressions and truth tables. Download it or print it for a lab bench or a revision sheet.

Logic gate symbols chartLogic Gate Symbols: ANSI / IEEE 91 and IEC 60617-12Distinctive-shape and rectangular symbols, Boolean expressions and truth tables. 1 = high, 0 = low.GateANSI / IEEE 91IEC 60617-12Boolean expressionTruth tableAND1 only if all inputs are 1ABY&ABYY = A · BY = ABY = A AND BABY000010100111OR1 if any input is 1ABY≥1ABYY = A + BY = A OR BABY000011101111NOTinverts the inputAY1AYY = A′Y = ¬AY = NOT AAY0110NAND0 only if all inputs are 1ABY&ABYY = ¬(A · B)Y = (A · B)′Y = A′ + B′ABY001011101110NOR1 only if all inputs are 0ABY≥1ABYY = ¬(A + B)Y = (A + B)′Y = A′ · B′ABY001010100110XOR1 if the inputs differABY=1ABYY = A ⊕ BY = A′B + AB′ABY000011101110XNOR1 if the inputs matchABY=1ABYY = ¬(A ⊕ B)Y = AB + A′B′ABY001010100111BUFFERpasses the input throughAY1AYY = AAY0011Symbols follow IEEE Std 91-1984 / 91a-1991 and IEC 60617-12. Truth tables are computed from each gate’s Boolean function. conceptviz.app/tools/logic-gate-symbols

Scroll sideways on small screens. Downloads are 2828 by 2000 px PNG or scalable SVG.

NAND and NOR are universal gates

Any Boolean function can be built from NAND gates alone, or from NOR gates alone, which is why chips and teaching kits stock so many of them. The trick is the inverter: tie both inputs of a NAND or NOR together and it becomes a NOT gate. Each example below is two gates in a chain, and the table next to it is computed from the circuit, then compared row by row with the gate it should equal.

AND from two NAND gates

AND from two NAND gatesABnY

The first NAND gives (A · B)′. The second NAND has both inputs tied to that signal, so it acts as a NOT and restores A · B.

AND from two NAND gates truth table
ABnYAND
00100
01100
10100
11011

Y matches the AND column on all 4 rows

OR from two NOR gates

OR from two NOR gatesABnY

The first NOR gives (A + B)′. The second NOR has both inputs tied together, so it inverts that signal and gives A + B.

OR from two NOR gates truth table
ABnYOR
00100
01011
10011
11011

Y matches the OR column on all 4 rows

The two symbol standards, side by side

  • ANSI / IEEE Std 91 (distinctive shape): each gate has its own outline. AND has a flat back and a rounded front, OR has a curved back and a pointed front, and XOR adds a second curved line behind the OR body. A triangle is a buffer. This is the style most US textbooks, data sheets and circuit simulators use.
  • IEC 60617-12 (rectangular shape): every gate is a rectangle, and a qualifier inside it names the function. "&" means AND, "≥1" means OR (at least one input is 1), "=1" means XOR (exactly one input is 1), and "1" means a single-input element. IEEE Std 91 and its supplement 91a also define this rectangular style, which is why the two standards share the same qualifiers.
  • Inversion: a small circle on the output, called the logic negation indicator, turns a gate into its inverted version. NOT is a buffer with a circle, NAND is AND with a circle, NOR is OR with a circle, and XNOR is XOR with a circle. This chart uses the circle everywhere. A small triangle, the polarity indicator, is a different mark that says a pin is active at a low level, and it is not used here.

How to read a truth table

A truth table lists every combination of input values and the output each one produces. With two inputs there are four rows, and with n inputs there are 2 to the power n rows. Every table on this page is computed in code by running the gate’s Boolean function over all input combinations, not typed in, so the rows always match the expression shown next to it. Use the A and B buttons above the cards to see one row light up on every gate at once. For example, with A = 1 and B = 0, AND gives 0, OR gives 1, XOR gives 1 and NAND gives 1.

Boolean expressions and De Morgan’s laws

Each card lists the common ways to write the gate’s function: a dot or no sign for AND, a plus sign for OR, a prime or the ¬ sign for NOT, and ⊕ for XOR. Two identities connect the gates. The NAND of A and B equals NOT A OR NOT B, and the NOR of A and B equals NOT A AND NOT B. These are De Morgan’s laws, and they are why a NAND gate is drawn as either an AND with a circle on the output or an OR with circles on the inputs in some diagrams. Both forms mean the same thing.

Why NAND and NOR are called universal gates

A set of gates is universal if every Boolean function can be built from it. NAND alone is universal, and so is NOR alone. Tying the two inputs of a NAND together gives a NOT. A NAND followed by that NOT gives AND. Feeding inverted inputs into a NAND gives OR. NOR works the same way with the roles of AND and OR swapped. This is why many logic families, and many exam questions, ask you to rebuild a circuit using only one gate type. The two worked examples above are drawn and checked by the page itself.

Sources and what this chart does not cover

Symbols are drawn from scratch for this page after the standards IEEE Std 91-1984 with supplement 91a-1991, and IEC 60617-12 (binary logic elements, now kept in the IEC 60617 database). The standards themselves are not reproduced. IEC also defines "=" as the equivalence qualifier (output 1 when all inputs are equal). For two inputs it matches "=1" with an output circle, which is how XNOR is drawn here, but with three or more inputs the two differ, so this chart sticks to the two-input form. The chart covers the eight basic gates with one or two inputs. Gates with more inputs, flip-flops, multiplexers and other IEC elements are outside its scope.

Frequently Asked Questions