K-map minimization is the full procedure for turning a function into its cheapest two-level form by hand. For a minimal sum of products:
- Fill the map with the 1s and any don't-care X's (filling a k map).
- List the prime implicants: grow each 1's group as far as it will go without touching a 0.
- Circle the essentials: any prime implicant that is the only cover for some 1 (essential prime implicant).
- Cover what's left with the fewest, largest remaining prime implicants. If there's a tie, any cheapest choice is correct.
- Read one product term per group and OR them together.
Then check: could two groups merge into a bigger one? Could any group be removed? If yes, you're not done.
"Minimal" means fewest terms first, then fewest literals. That keeps the gate input count low, which usually means fewer gates, less area and less delay.
For a minimal product of sums, run the same steps on the 0s (grouping zeros). Don't-cares may be used in either form, independently.
The method is reliable up to 4 variables, workable at 5 or 6, and replaced by software beyond that. The software uses the same ideas: prime implicants, essentials and covering.
| AB\CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1m0 | 1m1 | 0m3 | 1m2 |
| 01 | 1m4 | 1m5 | 0m7 | 1m6 |
| 11 | 0m12 | 0m13 | 1m15 | 0m14 |
| 10 | 0m8 | 1m9 | 1m11 | 0m10 |