The laws of Boolean algebra are equations that are true for every possible input. Because each side always equals the other, you may replace one with the other at any step. That lets you simplify an expression without writing out its whole truth table, which matters once there are 16, 64 or more rows.
The usual list, each with an OR form and an AND form:
- Identity: = A, = A
- Null: = 1, = 0
- Idempotent: = A, = A
- Complement: = 1, = 0
- Involution: = A
- Commutative, associative and distributive
- Absorption: = A
- De Morgan: =
- Consensus: =
The pairs exist because of the duality principle. Every letter can stand for a whole expression; see substitution rule. Write the law's name next to each step of a simplification so it can be checked.