Boolean Algebra

Boolean algebra is a system of logic developed to manipulate and simplify expressions made up of binary values - true or false, 1 or 0.

Started by George Boole in 1800s with a purpose to create Mathematical framework to describe logic operations. A century later it became the foundation for designing all digital circuits and computers.

Core Operations

These three operations are the building blocks of all digital logic -

  1. AND (·) - Outputs 1 only if both inputs are 1. Ex - Login requires password AND username
  2. OR (+) - Outputs 1 if at least one input is 1. Ex - Unlock a phone with Face ID OR PIN
  3. NOT (¬ or !) - Flips the input. Ex - If door is NOT closed, washing machine stops

Boolean Algebra Laws

Law NameExpression(s)Meaning
IdentityA + 0 = A
A · 1 = A
Adding false or multiplying by true doesn’t change the value
NullA + 1 = 1
A · 0 = 0
OR with true always gives true; AND with false always gives false
IdempotentA + A = A
A · A = A
Repeating a condition has no effect
ComplementA + ¬A = 1
A · ¬A = 0
A condition or its opposite is always true in OR; always false in AND
DominationA + 1 = 1
A · 0 = 0
Dominating values (1 in OR, 0 in AND) override everything
Double Negation¬(¬A) = ANegating a value twice gives back the original value
CommutativeA + B = B + A
A · B = B · A
Order doesn’t affect outcome for OR and AND
Associative(A + B) + C = A + (B + C)
(A · B) · C = A · (B · C)
Grouping doesn’t affect outcome
DistributiveA · (B + C) = A·B + A·C
A + (B · C) = (A + B) · (A + C)
Distribute one operation over another (like multiplying over addition)
AbsorptionA + A·B = A
A · (A + B) = A
Redundant conditions can be removed
De Morgan’s¬(A · B) = ¬A + ¬B
¬(A + B) = ¬A · ¬B
Converts AND to OR (and vice versa) when negating entire expressions

Logic Gates

Boolean operations come to life as logic gates in electronic circuits. These gates are wired together in chips to perform tasks like addition, memory storage etc., forming a backbone for digital electronics.

OperationGateBehavior
A · BAND1 only if both A and B are 1
A + BOR1 if A or B is 1
¬ANOTInverts A (0 → 1, 1 → 0)

basic-logic-gates

Derived Gates

  • NAND: ¬(A · B) - Simply means Not-And.
  • NOR: ¬(A + B) - Simply means Not-Or
  • XOR: A ⊕ B - Outputs 1 if inputs differ (A or B, but not both).
  • XNOR: ¬(A ⊕ B) - Outputs 1 if inputs are the same.

derived-logic-gates


Conclusion

Boolean algebra lets engineers create simple rules that machines can follow. By breaking down decisions into yes/no logic, we make systems more reliable and predictable.