UNDERSTANDING BOOLEAN LOGIC AND ITS APPLICATIONS
In the 1800’s (1815-1864), George Boole, a English mathematician who did extensive work in the subject of logic, invented a system of mathematics in which the abstract concepts of true and false can be used in computations. In an attempt to create a new form of mathematics, Mr. Boole identified certain patterns of logic that were later found to be easily translated into an electronic language—essentially, a "switchon/switchoff" pattern. Today, using tiny electronic switching mechanisms inside the computer, "decisions" are made with lightning speed within the central processing unit (CPU). These decisions are based on whether a tiny switch ...view middle of the document...
If the Boolean expression is True, the conclusion is executed.
Typically, the Boolean expression that is tested by an If-Then statement is formed with a relational operator, which determines whether a specific relationship exists between two values. Because the expression can be only true or false, it is considered to be a Boolean expression. Examples of Boolean expressions which use relational operators are as follows:
x >= y Is x greater than or equal to y?
x != y Is x not equal to y?
In the general format, the condition is any Boolean expression. If the expression is true, the statements that appear next are executed up to the line that reads Else; likewise, if the expression is false, the statements that appear between Else and End If are executed.
Programming languages provide a set of operators known as logical operators, which you can use to create complex Boolean expressions. The logical AND operator and the logical OR operator allow you to connect multiple Boolean expressions to create a compound expression. The logical NOT operator reverses the truth of a Boolean expression. Examples of compound Boolean expressions that use...