Glossary termMathematical logic

Boolean Logic

Also known as: Boolean algebra

Branch of algebra in which variables take only the values true and false and are combined with operations such as AND, OR and NOT.

Boolean logic is a system for reasoning with values that can only be true or false, often written as 1 and 0. Its basic operations are AND, which is true only when both inputs are true; OR, which is true when at least one input is true; and NOT, which inverts its input. Further operations, such as exclusive OR (XOR), which is true when exactly one input is true, can be built from these. Expressions combine operations to describe conditions of any complexity, and truth tables list the output for every possible combination of inputs.

The English mathematician George Boole set out this algebra of logic in "The Mathematical Analysis of Logic" (1847) and "An Investigation of the Laws of Thought" (1854), treating logical reasoning as calculation. For decades it was mainly of interest to logicians and philosophers. In 1937 Claude Shannon showed in his master's thesis that relay and switching circuits could implement Boolean expressions, so that logic could be built into machines. Digital chips are made from logic gates, physical circuits built from transistors that compute AND, OR, NOT and related functions. A single gate type, NAND, is enough to build all the others.

In programming, Boolean values control the flow of every program through if statements and loops, and the operators appear in languages as the words and, or and not or as symbols such as double ampersands. Many languages evaluate them with short-circuiting, skipping the second operand when the first decides the result. Boolean logic also underlies database queries, the search operators used to refine web searches and the binary arithmetic inside a CPU. Its strict true-or-false model is a simplification, and fields such as fuzzy logic and probabilistic reasoning extend it to handle uncertainty.

Key points

  • Boolean logic works with two values, true and false, combined using operations such as AND, OR and NOT.
  • George Boole developed the algebra in the 1840s and 1850s as a mathematical treatment of reasoning.
  • Claude Shannon's 1937 thesis showed how switching circuits could implement Boolean expressions.
  • Logic gates built from transistors compute Boolean functions, forming the basis of all digital hardware.

Related entries

Glossary term

Binary Number System

ProgrammingHardware

Base-2 positional number system that represents values using only the digits 0 and 1, the foundation of how digital computers store data.

Person

Claude Shannon

Ideas and CultureProgramming

American mathematician and engineer who founded information theory and showed that Boolean logic could be implemented in electrical circuits.

Glossary term

Transistor

Hardware

Semiconductor device that amplifies or switches electrical signals and serves as the basic building block of modern electronics and computer chips.

Glossary term

Main processor of a computer, which fetches, decodes and executes program instructions and coordinates the operation of other components.

Glossary term

Special commands and symbols added to search engine queries to narrow results by site, file type, exact phrase, page title or other attributes.

Glossary term

Set of electronic circuits fabricated together on a single small piece of semiconductor, combining many transistors and other components in one chip.

Glossary term

SQL

Programming

Declarative language for defining, querying and modifying data in relational databases, standardized by ANSI and ISO since the 1980s.

Glossary term

Information Theory

Ideas and CultureProgramming

Mathematical study of how information is quantified, compressed, stored and transmitted reliably, founded by Claude Shannon in 1948.

Referenced by

Other entries that discuss or point to Boolean Logic.