- - Technology-Enabled Learning
- - Digital Content
- - Professional Learning @ Western
- - WOS Studio
- - Events, Workshops and Programs
- - Disciplines using Maths
- Support and Resources
- - 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
- - eLearning Support
- Professional Learning
- Curriculum Renewal
- The 21C Project
- Sustainability Education
- Contact Us
Logic Basics: AND, OR, NOT
Logic is central to controlling the order in which instructions are executed in computer programs. in this module you will learn to use the logical operators AND, OR and NOT, which allow programmers to specify conditions which determine the flow of control.
The contents of these pages can be downloaded as a (non-interactive) PDF file from here.
True and False
Computer programs contain statements or conditions that can be true or false (but not both at once), so we begin with simple statements that are either true or false (but not both).
Logic is at the heart of computers; it is needed to understand how single bits are manipulated in the CPU. The most basic of operations are logic operations.
Logic is needed for programming to ensure that the correct statements are executed, and executed in the correct order.
The truth value of a statement is “true” if it is true and “false” if it is false. Here are some simple statements together with their truth values:
- 1 + 1 = 2. This is true.
- 45 < 50. This is true.
- 1 + 1 = 4. This is false.
- If our friend Jane is 20 years old then the statement “Jane is at least 18 years old” is true.
We sometimes write $T$ for true and $F$ for false.
Here are some practice questions for you to try. You will be directed to the next page based on your responses to these questions.
|The capital city of Australia is Perth.|