The logical operator NOT, !

The truth value of a statement can be changed by using the logical operator NOT. this page introduces NOT.

In Java and some other languages the logical operator NOT is written !.

Negating a statement (putting NOT in front) changes its truth value. The negation can often beformed by inserting the word "not" into the sentence at the appropriate place. For example, the negation of "The sky is blue" is "The sky is not blue".

The truth table for ! (NOT) is:

$a$$!a$
T F
F T

In some maths books you might see the symbol $\sim$ or $\lnot$ used for the logical operator NOT.

Example 1

Find the truth value of $!(24\ge 50)$.

Answer: $!\underbrace{24\ge 50}_{F}$ is !F, which is T.

Example 2

Find the truth value of $!!44-44=0$.

Answer: $!!\underbrace{44-44=0}_{T}$ is !!T. This is !F, which is T.

Practice Questions

Find the truth values of the following:

$!(1+1=2)$
NOT(The capital city of Australia is Perth)
$!(24\gt 42)$
$!!(24\gt 42)$