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.
The truth table has two rows, one per value of A, and the output column is the input column inverted. The parser accepts the word NOT, the programming form !A, the mathematical ¬A and the algebra prime A' (also the typographic prime A′); whichever you type, the page prints the formula in all four notations. In a diagram the inverter is a triangle with a small circle, the bubble, on its output; the same bubble marks the inverted output of NAND, NOR and XNOR gates.
NOT applies to the smallest thing to its right. NOT A AND B means (NOT A) AND B; to negate the whole conjunction you must write NOT (A AND B), and De Morgan's laws then tell you what that is in terms of the negated inputs. Two negations cancel (NOT NOT A is A), and NOT combined with a constant folds: NOT TRUE is FALSE.
In code the operator is ! in C, Java and JavaScript and not in Python; SQL's NOT behaves the same on TRUE and FALSE but leaves NULL as NULL. The tilde ~ is a bitwise complement in those languages, not a logical NOT, which is why the parser rejects ~A with a repair instead of guessing. In plain-language rules, “unless” and “except when” are negations: “members may enter unless banned” is member AND NOT banned.
Accepted spellings
NOT ! ¬ a' a′
NOT a!a¬aa'NOT A: NOT A
| # | A | f |
|---|---|---|
| 0 | FALSE | TRUE |
| 1 | TRUE | FALSE |
Beginnerf is true exactly when A is false.
In every other case, f is false.
About the operators:
- NOT reverses a value: true becomes false and false becomes true.
Intermediatef is true exactly when A is false.
In every other case, f is false.
Advancedf is true exactly when A is false [negation ¬].
In every other case, f is false.
Formal notation: ¬A
The common slip
Reading NOT A AND B as “not (A and B)”. NOT binds first, so the formula negates only A. The precedence page shows both groupings side by side, and the difference is visible on the row A = FALSE, B = FALSE.
Questions
Is NOT A the same as saying A is FALSE?
On a complete assignment, yes: NOT A is TRUE exactly when A is FALSE. An input with no value yet is a different thing; the engine reports an incomplete assignment rather than treating the missing input as FALSE.
Can I write NOT after the variable?
Yes, as the algebra prime: A' and A′ are accepted and mean NOT A. Several primes stack, so A'' is NOT NOT A, which simplifies back to A.
Related
Guides
Worked examples that use it
- Entry rule: (member OR invited) AND NOT banned, checked every way
- Entry rule slip: member OR (invited AND NOT banned) and the case that differs
- Exactly one of three: why XOR is the wrong tool
- At most one of three: mutual exclusion
- 2-to-1 multiplexer: (S AND B) OR (NOT S AND A)
- One-bit comparator: A greater than B
Laws
- Complement law: A AND NOT A = FALSE, A OR NOT A = TRUE
- Double negation (involution): NOT NOT A = A
- De Morgan's laws: NOT (A AND B) = NOT A OR NOT B, with proof and examples
- Negating constants: NOT TRUE = FALSE, NOT FALSE = TRUE
- XOR identities: A XOR FALSE = A, A XOR TRUE = NOT A, A XOR A = FALSE
- Implication elimination: A → B = NOT A OR B, and the →E rule
Tools
- Truth table generator: any Boolean expression, up to 12 variables, with intermediate columns
- Logic circuit generator: Boolean expression to gate diagram (SVG)
See also
- Double negation (involution): NOT NOT A = A
- De Morgan's laws: NOT (A AND B) = NOT A OR NOT B, with proof and examples
- Operator precedence in Boolean logic: NOT, then AND, then XOR, then OR
- ~ is bitwise NOT in code, logical NOT in some textbooks
- An unassigned input is not FALSE: incomplete assignments
- Lesson 1: NOT, AND, OR: the basic operators (beginner, 10 min)
Operators and gates
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.