XOR expanded to SOP — XOR gate
exam standardwhy XOR resists minimisation
Answer
A′ · B + A · B′
Why this example is worth doing
Written as a sum of products, XOR is two terms of two literals with no adjacency between them, so Quine–McCluskey and the K-map both report it as already minimal at a cost of five gates — against one gate for the XOR symbol. This is the concrete case behind the general warning that two-level minimisation optimises the wrong cost function for XOR-heavy logic, which matters because arithmetic and error-correction circuits are almost entirely XOR.
Try your own input in the XOR gate. Truth table, symbol and algebraic form for A ⊕ B, the difference detector.
How the answer is reached
Step by step
A ⊕ BA · B′ + A′ · B— Definition of XOR — A ⊕ B = A·B' + A'·B
A ⊕ B simplifies to A · B′ + A′ · B in 1 step. That is a proven minimum (2 terms, 4 literals), not a best effort. It is the only minimum-cost form.
Quine–McCluskey
| # | Term |
|---|---|
| 1 | A′ · B |
| 2 | A · B′ |
| # | Cover |
|---|---|
| 1 | A′ · B + A · B′ |
2 term(s), 4 literal(s); 2 essential prime implicant(s).
Truth table
| # | A | B | F |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 2 | 1 | 0 | 1 |
| 3 | 1 | 1 | 0 |