Karnaugh Maps Study Notes

Unit 9: Combinational Minimization - Karnaugh Maps

Course Information

  • Course: EE109 - Combinational Minimization
  • Instructor: Mark Redekopp
  • Year: 2025
  • Content is protected and may not be shared, uploaded, or distributed.

Learning Outcomes

  • Understand and utilize Karnaugh maps for synthesizing combinational functions with multiple outputs.
  • Assess memory size and contents necessary for implementing a given logic function (truth table).

Covering Combinations

  • Minterm Definition: A minterm corresponds to exactly one combination of a logic function.
    • Example for logic function with variables W, X, Y, Z:
      | W | X | Y | Z | F |
      |---|---|---|---|---|
      | 0 | 0 | 0 | 0 | 0 |
      | 0 | 0 | 0 | 1 | 0 |
      | 0 | 0 | 1 | 0 | 0 |
      | 0 | 0 | 1 | 1 | 0 |
      | 0 | 1 | 0 | 0 | 1 |
      | 0 | 1 | 0 | 1 | 0 |
      | 0 | 1 | 1 | 0 | 0 |
      | 0 | 1 | 1 | 1 | 1 |
      | 1 | 0 | 0 | 0 | 0 |
      | 1 | 0 | 0 | 1 | 0 |
      | 1 | 0 | 1 | 0 | 1 |
      | 1 | 0 | 1 | 1 | 1 |
      | 1 | 1 | 0 | 0 | 0 |
      | 1 | 1 | 0 | 1 | 1 |
      | 1 | 1 | 1 | 0 | 1 |
      | 1 | 1 | 1 | 1 | 0 |
  • Example Minterm: F = WX'YZ = m11.

Variables and Combinations

  • Removing Variables: As we decrease variables from a product term, it covers more combinations.
    • The product term evaluates as true regardless of the removed variable's value, indicating independence from that variable.
  • Example: F = WX'Z simplifies representations and reduces circuit complexity.
  • Circuit implication: A smaller term indicates fewer gates, making design simpler and more efficient.

Functions and Techniques for Minimization

  • Finding Smaller Terms
    • Option 1: Boolean Algebra
    • Option 2: Karnaugh Maps (K-maps), best for human visualization, suitable for up to 6 variables (becomes complex beyond 4).
  • K-maps always produce at least a minimal two-level (SOP or POS) implementation, although alternative configurations might provide a more compact design.

Gray Code Introduction

  • Definition: A type of binary numeral system where two successive values differ in only one bit.
  • Example of 2-bit Gray Code: 0 0, 0 1, 1 1, 1 0.
  • 3-bit Gray Code Characteristics: Maintains the same principle, ensuring sequential transitions differ only by one bit.

Constructing Karnaugh Maps

  • Each square in a K-map corresponds to one input combination, labeled according to Gray Code.
  • Truth function values are filled in the corresponding squares, reflecting the output of the logic function.

Example of K-map Filling

  • For a 4-variable function:

    • Label the axes in Gray code order for W, X (horizontal), Y, Z (vertical).
  • Values example for variables:

    • (F(w,x,y,z) = m1 + m2 + m3 + m5 + m6 + m7) representing how each minterm is defined through positional alignment in the K-map.

Simplification Techniques Using Karnaugh Maps

  • Groups of 1’s: Squares in the K-map with ‘1’ indicate minterms required in the SOP solution.
    • Example Minterms: F function outputs shown in the table are represented as 1's in the K-map.
  • Groups can be formed in 1, 2, 4, 8, etc., rectangular or square formations, simplifying to smaller product terms with fewer variables.
  • Note: Groups can wrap around edges on the K-map, for example, connecting the left and right edges.
  • K-map Example (based on defined variables):

|

  • XYZF
    00000
    00011
    0010

    Optimal Grouping Guidelines

    • Aim to cover all 1’s with the fewest groups while ensuring groups are as large as possible, even if that means overlapping.
    • Example Grouping: Ensuring covering is achieved for combinations even if it results in repeating squares across different groups.

    Don't-Care Outputs

    • Definition: Situations where certain inputs are illegal or undesirable due to external constraints; their outputs can either be '0' or '1'.
    • Treat as wildcards in K-maps, allowing groups of 'don't-cares' to ensure covering legitimate outputs more efficiently.
    • Useful for maximizing group's size for valid outputs, achieving greater simplification in the output function.

    Combinational Circuit Design Process

    • Understand problem statement including input/output requirements, create a truth table, and design using K-maps.
    • Example Design Context: A 3-bit decrementer logic where a transformation occurs based on input combinations.

    Advanced Functionality with Multiple Variables

    • Multi-variable K-maps: 5-variable requires a more complex representation (32-squares), impractical to visualize in human interpretation beyond 6-variables.
    • Techniques like Quine-McCluskey or Espresso algorithm can provide solutions to NP-hard minimization problems with heuristics.

    Terminology in K-maps

    • Implicant: A product term grouping that implies F=1;
    • Prime Implicant: The largest grouping possible (smallest product term);
    • Essential Prime Implicant: A term necessary to cover all 1’s in F.