The complement of a function F, written F′ (or F with a bar), flips every output: F′ is 1 on F's 0-rows and 0 on F's 1-rows.
In canonical form it is just bookkeeping. If F = Σm(S) = ΠM(R):
- F′ = Σm(R): F's 0-rows are F′'s 1-rows.
- F′ = ΠM(S): F's 1-rows are F′'s 0-rows.
So to complement, change the symbol or the list, never both. Changing both just rewrites F itself; see canonical form conversion.
From an expression, use de morgans laws: swap AND with OR and complement every literal, keeping the grouping. The complement of is .
Why it is useful:
- The minimal POS of F is the De Morgan of the minimal SOP of F′. Grouping F's 0s gives F′.
- Each maxterm is the complement of the matching minterm:
Mᵢ= (mᵢ)′. - Some circuits naturally produce F′, and an inverter at the output fixes it.
Do not flip the bits of the indices. That renames rows; it does not swap 1s and 0s.
| 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 | 0 |