UNIHIVE

Study Hub UNIPORT CSC 284

CSC 284 · Introduction to Logic Design

Minimisation with Karnaugh maps

Why fewer gates matter, 2-, 3- and 4-variable maps, grouping rules, and don't-care conditions.

Our notes

2 min read

Why minimise?

A simpler expression means fewer gates, less delay, lower cost and lower power. Algebra works but can be slow; the Karnaugh map (Maurice Karnaugh, 1953) makes the steps visual.

The map

A K-map is a truth table drawn as a grid. Rows and columns are labelled in Gray code (00, 01, 11, 10) so neighbouring cells differ in one variable. Cells at opposite edges are also neighbours (the map wraps around).

  • 3 variables: 2 × 4 cells. 4 variables: 4 × 4 cells.

Grouping rules (SOP)

  1. Put 1s in the cells where F = 1.
  2. Circle groups of 1, 2, 4, 8 or 16 neighbouring 1s, as large as possible, in rectangles.
  3. Every 1 must be in at least one group; groups may overlap.
  4. Use as few groups as possible.
  5. Each group gives a product term: keep only the variables that do not change inside it.

Worked example

Minimise F(A, B, C, D) = Σm(0, 2, 5, 7, 8, 10, 13, 15).

  • m0, 2, 8, 10 are the four corners: a group of four where B = 0 and D = 0 → B'D'.
  • m5, 7, 13, 15 form a square where B = 1 and D = 1 → BD.
  • F = B'D' + BD (an XNOR of B and D). Checked against the full table by computer.

Don't-care conditions

Some input combinations never happen (for a BCD input, 10 to 15). Mark them X; use an X as 1 if it makes a group bigger, otherwise ignore it.

Worked example with don't cares

A BCD digit (ABCD) is to light an output when the digit is 8 or 9: F = Σm(8, 9) with d(10 to 15). Grouping m8, m9 with the Xs at 10 to 15 gives a group of eight where A = 1, so F = A: one wire, no gates.

Product of sums

Group the 0s instead and write OR terms with the complemented sense; useful when the 0s are fewer.

Prime implicants

A group that cannot be made bigger is a prime implicant; one that covers a 1 no other group covers is essential. The Quine-McCluskey method finds them by table for more than 5 or 6 variables, and is how software tools minimise.

Exams usually ask

  • Minimise 3- and 4-variable functions, with and without don't cares.
  • Explain why the map uses Gray code labels.

Common mistake

Making groups of 3 or 6: groups must hold a power of two (1, 2, 4, 8, 16) cells.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

Practise

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All CSC 284 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.