Boolean algebra is a branch of mathematics that deals with variables that can have only two values: TRUE (1) or FALSE (0). Developed by George Boole in the 19th century, it forms the foundation of digital logic design, computer circuits, and programming. In computing, Boolean operations are implemented directly in hardware using logic gates.
The NOT operation inverts the value: TRUE becomes FALSE, and FALSE becomes TRUE.
| A | NOT A |
|---|---|
| 0 | 1 |
| 1 | 0 |
The AND operation is TRUE only if both inputs are TRUE.
| A | B | A AND B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
The OR operation is TRUE if at least one input is TRUE.
| A | B | A OR B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
The XOR operation is TRUE only if exactly one input is TRUE.
| A | B | A XOR B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
NAND is the negation of AND. It is functionally complete—any Boolean function can be built using only NAND gates.
NOR is the negation of OR. Like NAND, it is also functionally complete.
A AND B = B AND A
A OR B = B OR A
(A AND B) AND C = A AND (B AND C)
(A OR B) OR C = A OR (B OR C)
A AND (B OR C) = (A AND B) OR (A AND C)
A OR (B AND C) = (A OR B) AND (A OR C)
A AND 1 = A
A OR 0 = A
NOT (A AND B) = (NOT A) OR (NOT B)
NOT (A OR B) = (NOT A) AND (NOT B)
Boolean algebra is used to simplify digital circuits, design logic gates in CPUs, implement conditional statements in programming (e.g., if A and B), create search engine queries, and model decision-making processes. Mastering these basics is essential for understanding how computers perform logical operations at the lowest level.