Boolean expression

In computer science, a Boolean expression is a logical statement that expresses or generates a Boolean value. Boolean values are often characterized as truth values because they have only two possible modes: true and false. Some sources also acknowledge additional modes for Boolean values, including yes and no, on and off, or null (invalid) and not-null (valid).

Boolean expressions may also contain Boolean formulae or variables, Boolean values generated via comparison operators, and functions that produce Boolean outcomes. Boolean expressions are part of a larger body of the many Boolean systems used in contemporary computer science, which derive from a logic framework initially developed for use in mathematics and records management by the English logician, philosopher, and mathematician George Boole.

rssalemscience-20230222-25-194160.jpg

Background

George Boole is credited with importing algebraic structures into the field of logic. Born in 1815, Boole was a Lincolnshire, England-born schoolmaster who became a mathematics professor at Cork, Ireland-based Queen’s University in 1849. His professorship closely followed the 1847 publication of The Mathematical Analysis of Logic, which is recognized as one of Boole’s two major works. The other, The Laws of Thought, was published in 1854.

In The Mathematical Analysis of Logic and The Laws of Thought, Boole created a groundbreaking system of logic by adapting the principles of symbolic algebra into his novel paradigm. Scholars now recognize Boole’s contributions to logic as pioneering and critically important: Boolean systems fundamentally replaced the Aristotelian logic that had dominated the field since the age of antiquity. Aristotelian logic uses a system of argument forms universally recognized as valid, classifying arguments as either valid or invalid depending on whether they satisfy or fail to satisfy the requirements of a given form. Boolean logic instead used algorithmic structures, which route arguments into a linked series of evaluations that check for binary outcomes, such as “true or false,” “yes or no,” and “on or off.” This innovation allowed logicians to analyze arguments of any number, type, or complexity according to a simple and readily applicable set of principles.

During Boole’s lifetime, information systems were paper-based and Boole primarily applied his logical system to expedite the searching of information repositories for specific pieces of data. Boolean systems allowed people to perform efficient and accurate searches by including certain classes of information and excluding others. In the mid-twentieth century, Boolean logic was imported into the emerging field of computing when Bell Labs built AN/FSQ-7, a massive early supercomputer that was used by the United States Air Force in the early 1950s. The AN/FSQ-7 system was built on Boolean logic, which went on to become a critical feature of computer programming. Boolean logic occupies a fundamental functional role in modern desktop and mobile technologies, including computer systems and smartphones. In these systems, Boolean logic indicates whether a specific circuit state or location in the system’s memory has a “positive,” “true,” or “on” value (1) or a “negative,” “false,” or “off” value (0).

Overview

Boolean expressions, as they apply to computer science, are operations-based logical statements that result in either a “positive,” “true,” or “on” outcome (1) or a “negative,” “false,” or “off” outcome (0). Computer systems use software and algorithms that employ Boolean expressions to determine how to behave or respond in a specific situation. Boolean expressions can include Boolean formulae or variables, Boolean values generated by comparison operators, or functions that express Boolean results when carried out or completed.

Boolean formulae represent strings of related propositions or events, each of which has only two possible outcomes. A Boolean variable is any variable that has only two possible states. Comparison operators are operators that prompt a computer system to compare two values and use the result to complete a Boolean expression. The 10 Boolean operators include “=” (equal to), “!=” (not equal to), “<” (less than), “<=” (less than or equal to), “>” (greater than), “>=” (greater than or equal to), “is null” (indicates an invalid or null value), “is not null” (indicates a valid value, or a value other than null), “like” (the value matches a defined string), and “not like” (the value does not match a defined string). Comparison operators complement the logical Boolean operators AND, OR, and NOT, and their derivatives NOR, NAND, and XOR. Logical Boolean operators are commonly used in search engine algorithms, which include or eliminate results based on whether the result satisfies the condition created by a specific operator. Any other mathematical or logical function that yields a Boolean result (positive/true/on/1 or negative/false/off/0) may also be part of a Boolean expression.

In their most fundamental forms, Boolean expressions contain three elements: two elements to be evaluated or compared, and one operator that instructs the system on how to evaluate or compare the two elements. By solving Boolean expressions, a computer or system can determine how to respond or behave in a particular situation. Multiple Boolean expressions, each of which generates a Boolean value, can also be combined to generate responses to more complex situations, with the overall response depending on the value generated at each step of the combined Boolean expressions.

The function of Boolean expressions is often described using “if/then” forms. Computers and computing systems often use Boolean expressions to determine what to do if a particular condition is or is not satisfied. For example, a computer system carries out a Boolean operation in response to a user entering a specific password for a given digital account. If the password is correct, then the software will grant the user access to the account. If it is incorrect, then the software will disallow access.

Bibliography

Ahmed Hamid Ahmed, Rasha, and Um Salama Ahmed Abd Alla Alemam. "Boolean Algebras and Their Applications." ACTA Scientific Computer Sciences, vol. 6. no. 6, June 2024, actascientific.com/ASCS/pdf/ASCS-06-0525.pdf. Accessed 8 Nov. 2024.

Awati, Rahul. “Boolean.” Tech Target, Nov. 2022, www.techtarget.com/whatis/definition/Boolean. Accessed 29 Mar. 2023.

“Boolean Expressions.” Emory University, mathcenter.oxford.emory.edu/site/cs170/BooleanExpressions/. Accessed 29 Mar. 2023.

“Boolean Expressions.” Oracle, 2003, docs.oracle.com/cd/B12037‗01/olap.101/b10339/expression006.htm. Accessed 29 Mar. 2023.

“Boolean Expressions (Visual Basic).” Microsoft, 15 Sep. 2021, learn.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/operators-and-expressions/Boolean-expressions. Accessed 29 Mar. 2023.

“Boolean Formulas.” Rice University, www.clear.rice.edu/comp487/LecBooleanFormula.pdf. Accessed 29 Mar. 2023.

“Boolean Values.” IBM, 19 Jan. 2022, www.ibm.com/docs/en/ias?topic=list-Boolean-values. Accessed 29 Mar. 2023.

“Comparison Operators.” IBM, 10 Jan. 2023, www.ibm.com/docs/en/cics-ts/6.1?topic=expressions-comparison-operators. Accessed 29 Mar. 2023.

“George Boole.” Stanford Encyclopedia of Philosophy, 29 Dec. 2021, plato.stanford.edu/entries/boole/. Accessed 29 Mar. 2023.