Math Wiki
Register
Advertisement

Boolean logic is a complete system for logical operations. It was named after George Boole, an English mathematician at University College Cork who first defined an algebraic system of logic in the mid 19th century. Boolean logic has many applications in electronics, computer hardware and software. In 1938, Claude Shannon showed how electric circuits with relays were a model for Boolean logic. This fact soon proved enormously consequential with the emergence of the electronic computer.

Boolean logic is used extensively in creating computer programs particularly to control flow of the program. 'If' statements are flow control instructions which are encountered in nearly every computer language and which use boolean logic. The 'if' statment returns a value of either true or false and the program is redirected accordingly.

Boolean Statements

True and False

Boolean logic statements can only return one of two values - true or false.

Boolean Operators 'and', 'or', 'not' and 'equals'

The main operators in Boolean statements are 'and', 'or', 'not' and 'equals'. To keep the statements succinct we use symbols to represent each of these operators. Programming languages use a range of abbreviations for these operators but in mathematics the following are used:

and -

or -

not -

equals -

Equals is used to test whether the value on the left side of the statement is equivalent to the value on the right side. If it is then the returned value is true.

e.g. returns true. We can read this as "The statement 'two plus three equals five' is true."

while returns false. We can read this as "The statement 'three plus four equals six' is false." (Note that the addition operator, +, is not a boolean operator)

These statements can now be combined using the 'and' operator or the 'or' operator as follows:

returns true because both statements are true. (The brackets are only added to clarify what is happening.)

This can be read as follows: Because 'two plus three equals five' is true and 'four plus two equals six' is true then the overall statement is true.



Advertisement