More on NOT
This page contains more examples of the use of NOT.
The logical operator NOT is written ! when writing a program in Java. here both NOT and ! are used because it is important to know both.
Often T is written for true and F for false.
Putting NOT before a true statement creates a false statement. Putting NOT before a false statement creates a true statement. This is summarised in the truth table for NOT.
Example 1
What is the truth value of NOT $3=3$?
Answer: $3=3$ is T (true). So NOT $3=3$ is F (false).
Example 2
What is the truth value of $!3=3$?
Answer: $!3=3$ could be written as $!(3=3)$. It is the same as NOT $3=3$. therefore it is F.
Example 3
What is the truth value of "\$1000 is not less money than \$5"?
Answer: We could write this as NOT (\$1000 is less money than \$5). We know that (\$1000 is less money than \$5) is F, so NOT (\$1000 is less money than \$5) is T.
Example 4
What is the truth value of $!!5\le 6$?
Answer: $5\le 6$ is T. So $!5\le 6$ is F. Therefore $!!5\le 6$ is T.
Some for you to try
Find the truth value of each statement (that is, decide whether each is true or false).
| $5-3=0$ | [ ]True [ ]False |
| $!5-3=0$ | [ ]True [ ]False |
| $!!5-3=0$ | [ ]True [ ]False |
| $!-1\lt 1$ | [ ]True [ ]False |
| The sky is NOT always red. | [ ]True [ ]False |
| $!0=0$ | [ ]True [ ]False |
| $!!23\le 100$ | [ ]True [ ]False |
Check Answer
That's correct! You should move on to this page to continue your explorations.
Not quite. Try these questions for more practice.
| $2+2=4$ | [ ]True [ ]False |
| $!2+2=4$ | [ ]True [ ]False |
| $!!2+2=4$ | [ ]True [ ]False |
| Finnish is NOT the main language of Australia. | [ ]True [ ]False |
| $!10\lt 100$ | [ ]True [ ]False |
| NOT $10\lt 100$ | [ ]True [ ]False |
Check Answer
That's correct! You should move on to this page to continue your explorations.
Not quite. Read this page again and try the questions one more time.