Combinational Blocks — worked example
Digital Logic 101 · Combinational Blocks · Example
Implement F(A,B,C) = Σm(0, 2, 5, 7) with a 4:1 MUX
A 2k:1 MUX implements any k-input Boolean function when k − 1 of the function's variables drive the select lines and the data inputs are tied to the remaining variable, its complement, 0, or 1. With a 4:1 MUX (two select lines) and three variables A, B, C, we use A and B as selects and let C — or something built from C — drive each of D0..D3.
Step 1 — Truth table
Write F across all 8 rows of (A,B,C):
| A | B | C | F |
|---|---|---|---|
| 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
Step 2 — Residue table
Group rows by (A,B). Each (A,B) pair gives two rows of F — one for C=0 and one for C=1. The two values together pin down which of {0, 1, C, C'} that data input must be.
AB F at C=0 F at C=1 Tie D_AB to 00 1 0 C' 01 1 0 C' 10 0 1 C 11 0 1 C
Read the residue rule from the two F-values per (A,B):
- F=0 in both rows → tie D to 0.
- F=1 in both rows → tie D to 1.
- F follows C (00 / 11 → 0 / 1) → tie D to C.
- F is the inverse of C (00 / 11 → 1 / 0) → tie D to C′.
Step 3 — Map AB to D-inputs
With A as the MSB of the select (S1) and B as the LSB (S0), AB=00 picks D0, AB=01 picks D1, AB=10 picks D2, AB=11 picks D3.
- D0 = C′ — because at AB=00 F is C\,'.
- D1 = C′ — because at AB=01 F is C\,'.
- D2 = C — because at AB=10 F follows C.
- D3 = C — because at AB=11 F follows C.
Step 4 — Verify algebraically
Expanding the MUX equation:
Substitute D₀=D₁=C′ and D₂=D₃=C:
Multiply out and collect minterms:
That is exactly Σm(0, 2, 5, 7). ✓