The majority function outputs whatever most of its inputs say. With three inputs A, B and C it is 1 when at least two of them are 1:
Each product covers one pair being 1, and the OR collects them. Its truth table has 1s in rows 011, 101, 110 and 111.
It is a classic simplification exercise. The canonical form has four minterms, , and can combine with each of the other three. Copying it twice with the idempotent law gives the three two-literal products.
Where it shows up:
- Voting and fault tolerance. Three copies of a circuit vote, and a single faulty copy is outvoted.
- Adders. The carry out of a full adder is the majority of its three inputs: a carry happens when at least two of A, B and the carry in are 1.
Notice what the minimal form is not: ("exactly two") leaves out row 111 and has no simpler SOP.
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 |