Logic gates and Boolean operators: truth tables and symbols
The logic gates and operators the engine understands: truth tables for two, three and four inputs, every accepted spelling, and the precedence that decides how an unbracketed expression is read.
NOT, AND, OR, XOR, NAND, NOR and XNOR are the gates; implication and the biconditional are the operators propositional logic adds; TRUE and FALSE are the constants. Each page shows the tables the engine generated for the operator, the symbol every notation uses for it (AND, &&, ∧, ·), the plain-language reading at three levels, and the diagram of the gate.
Two pages carry most of the traffic of this section for a reason. The XOR page explains why a chain of three XORs is odd parity rather than “exactly one”, which is the single most common slip in rule writing. The precedence page shows how A OR B AND C is read (as A OR (B AND C)) and why the fully grouped form is worth asking for before you trust a formula.
Spanish readers will find both regional words on every gate page: compuertas lógicas, the usual term in Latin America, and puertas lógicas, the usual term in Spain.
- NOT gate (inverter): truth table, symbol and the NOT operator
NOT flips a value: NOT A is TRUE when A is FALSE and FALSE when A is TRUE. It is the only one-input operator, and it binds tighter than everything else. - AND gate: truth table for 2, 3 and 4 inputs, symbol and expression
AND is TRUE only when every input is TRUE. The tables below show it with two, three and four inputs: one TRUE row each, always the last one, and a table that doubles in length with every input added. - OR gate: truth table for 2, 3 and 4 inputs, inclusive or explained
OR is inclusive: it is TRUE when at least one input is TRUE, including when several are. Its only FALSE row is the one where every input is FALSE, which is row 0 in every table below. - XOR gate: truth table for 2, 3 and 4 inputs (odd parity, not “exactly one”)
XOR, exclusive or, is TRUE when its two inputs differ. With three or more inputs a chain of XOR means odd parity, TRUE when an odd number of inputs are TRUE, which is not the same as “exactly one”. - NAND gate: truth table for 2, 3 and 4 inputs, universal gate
NAND is an AND followed by a NOT: NAND(A, B) is FALSE only when both inputs are TRUE. It is a universal gate, because NOT, AND and OR can all be built from it. - NOR gate: truth table for 2, 3 and 4 inputs, universal gate
NOR is an OR followed by a NOT: NOR(A, B) is TRUE only when both inputs are FALSE. Like NAND it is universal, and it is the gate behind “neither A nor B”. - XNOR gate: truth table, symbol and equivalence with the biconditional
XNOR is TRUE when its two inputs are equal: both TRUE or both FALSE. It is the negation of XOR, the gate of an equality comparator, and the same function as the biconditional A <-> B. - Implication (→, if–then): truth table and why a false antecedent makes it true
Implication, A -> B, read “if A then B”, is FALSE in exactly one case: A TRUE and B FALSE. When A is FALSE the implication is TRUE whatever B is, which is the part that surprises everyone once. - Biconditional (↔, if and only if): truth table and examples
The biconditional A <-> B, read “A if and only if B”, is TRUE when A and B have the same value and FALSE when they differ. - Is 1 true or false? 1 = TRUE, 0 = FALSE in Boolean logic
In Boolean logic, 1 means TRUE and 0 means FALSE: they are the only two values, written TRUE and FALSE in the words and programming notations and 1 and 0 in the mathematical and algebra notations. - Operator precedence in Boolean logic: NOT, then AND, then XOR, then OR
Without brackets, NOT binds first, then AND, then XOR, then OR; implication and the biconditional come last.
Questions
Why does the engine accept NAND only in function form, NAND(A, B)?
An infix NAND has no agreed precedence and is not associative, so A NAND B NAND C would be ambiguous. The function form with exactly two operands removes the ambiguity, and the parser offers the repair when you type the infix form.
Where is the 3-input NAND table?
On the NAND page, as NOT (A AND B AND C): a NAND of three inputs is the negation of their conjunction, which is also how the engine writes it.
Related
Guides
Generated from the Tangibool engine, semantics tangibool-semantics/1, engine 1.0.0, build . Every table, map, simplification and verdict on these pages was computed by the Tangibool engine when the site was built, and every claim was re-checked by the same exact checker the app uses. Limits are stated where they apply. © 2026 Foreranger LTD.