Boolean expressions
Often, whether a control statement evaluates to true and a machine properly turns on will be dictated by a number of conditions, such as a series of variables being true or a series of switches being on. Boolean expressions are essentially specialized math equations that will determine whether an output will be on or off based on the state of the inputs.
The whole “math” concept may frighten a lot of people; however, the math behind Boolean expressions is not scary at all and is little more than adding or multiplying 1s and 0s. In a mathematical sense, each of the Boolean operators we explored previously will boil down to addition, multiplication, or simply flipping a value from 0 to 1, or vice versa. This, for the most part, means, that if you can multiply by 1 or 0 and add by 1 or 0, you have a solid foundation for Boolean calculations.
Exploring NOT
To start off with Boolean expressions, let’s explore the NOT
operator in more depth...