-
Teaching Support
- - Technology-Enabled Learning
- - WOS Studio
-
- MESH
- - Events, Workshops and Programs
- - Resources by Discipline
-
- Support and Resources by Topic
- - Statistics Help (General)
- - Statistics Help (R Commander)
- - Arithmetic
- - Standard Derivatives
- - Standard Integrals
- - Hyperbolic Trigonometric Functions
- - Remainders and Quotients
- - SPSS Help
- - Logic Basics: AND, OR, NOT
- - Approximations: rounding and truncation
- - Mathematical Terminology
- - Proportional Reasoning
- - Number Sense
- - I Don't Get It
- - Percentages
- - Contact the MESH team
- - MESH Research
- - Resources for Staff
- - Smart Assessment Design Toolkit
- - Placements Hub
- - Digital Learning
- - Academic Integrity
- - Academic Integrity Research
- - Academic integrity quick guide
- Professional Learning @ Western
- Learning Transformations
- The 21C Project
- Contact Us
- Engaged Teaching
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)$ |
Mobile options: