Skip to content

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′

WordsNOT a
Programming!a
Mathematical¬a
Algebraa'

NOT A: NOT A

NOT A
#Af
0FALSETRUE
1TRUEFALSE
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
NOT A NOT A A f NOT
NOT A NOT A A f NOT

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

Laws

Tools

See also

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.