← ProblemsCircuits / Combinational Logic / Karnaugh Map to Circuit
4-variable K-map
15%kmapboolean-algebraImplement the circuit described by the Karnaugh map below. Columns give a and b, rows give c and d (Gray-code ordered, so adjacent cells differ in one variable; the map also wraps around its edges).
| a'b' | a'b | ab | ab' | |
|---|---|---|---|---|
| c'd' | 1 | 1 | 0 | 1 |
| c'd | 1 | 0 | 0 | 1 |
| cd | 0 | 1 | 1 | 1 |
| cd' | 1 | 1 | 0 | 0 |
Look for rectangular groups of 1s sized 1, 2, 4, or 8 — remember groups may wrap across the top/bottom and left/right edges. Any expression that matches the map on all 16 input combinations is accepted.