Every gate has a symbol used in logic diagrams. Inputs attach on the left (the back) and the output leaves on the right (the front). To name any symbol, check two things in order.
1. The body shape.
- AND: a flat back and a round front, like a D.
- OR: a curved back and a pointed front, like a shield on its side.
- XOR: the OR shape with an extra curved line behind the back.
- NOT / buffer: a triangle pointing the way the signal flows.
2. A bubble on the output. It inverts the result:
- AND + bubble = NAND
- OR + bubble = NOR
- XOR + bubble = XNOR
- triangle + bubble = NOT
Bubbles can also appear on inputs, which inverts just those inputs. Such drawings are the alternative forms produced by bubble pushing; an OR with bubbled inputs is a NAND, for example.
These curved shapes are the distinctive-shape symbols from the US standard, which most textbooks use. You may also meet the rectangular IEC style, where every gate is a box with a label inside: & for AND, ≥1 for OR, =1 for XOR, and 1 for a buffer or NOT, with a small circle or triangle marking inversion.