Abstract

Two-level logic simplification minimizes the literal and gate count of Boolean functions to reduce physical silicon area, power dissipation, and propagation delay. The fundamental mechanism driving simplification is the Uniting Theorem (). Geometric abstractions—such as Boolean Cubes and Karnaugh Maps (K-Maps) utilizing Gray code ordering—allow adjacent minterms that differ by a single variable to be combined visually. By incorporating Don’t Care () conditions and systematically identifying Prime Implicants (PIs) and Essential Prime Implicants (EPIs), complex switching functions can be reduced to minimal Sum-of-Products (SOP) forms.


Key to Simplification: The Uniting Theorem

The algebraic cornerstone of all two-level logic minimization is the Uniting Theorem:

The Uniting Principle

If two product terms in the ON-set differ in exactly one variable (one appears in true form, the other in complemented form), that varying variable can be eliminated, leaving a single product term with one fewer literal to represent both elements.


Visualizing the Uniting Theorem combining two terms differing in a single bit.


Geometric Abstraction: Boolean Cubes

A Boolean Cube is a geometric representation of an -variable Boolean space as an -dimensional hypercube (-cube):

  • Vertices (Nodes): Represent individual minterms ( nodes for variables).
  • Edges: Connect nodes that differ by exactly one variable bit (Hamming distance = 1).
  • Node Types:
    • ON-set (): Represented as solid nodes.
    • OFF-set (): Represented as empty nodes.
    • DC-set (): Represented as X’d nodes.


1-cube, 2-cube, 3-cube, and 4-cube topologies.


Applying the Uniting Theorem to merge adjacent solid nodes into subcube faces.


Karnaugh Maps (K-Maps) & Gray Code Adjacency

A Karnaugh Map (K-Map) is a flattened 2D planar projection of a Boolean hypercube designed to make adjacencies visually obvious.

Gray Code Indexing

K-Map rows and columns are arranged using Gray code sequences (where adjacent cells differ by only one bit), rather than standard binary count order:

Boundary Wraparound

Adjacency in a K-Map wraps around the outer borders. The leftmost column is adjacent to the rightmost column, and the top row is adjacent to the bottom row. The four corners of a 4-variable map are also mutually adjacent.


3-Variable K-Map layout showing Gray Code column indexing ().


3-Variable K-Map highlighting a 2-cube subcube representing the literal .


Incompletely Specified Functions & Don’t Cares ()

In many digital circuits, certain input combinations either cannot occur or their outputs do not affect system behavior. These conditions are represented as Don’t Care () values.

Sources of Don’t Cares

  1. Unused Input Patterns: BCD (Binary Coded Decimal) uses 4 bits to represent decimal digits ; the binary patterns (10–15) never occur.
  2. Ignored Outputs: A decoder driving a 7-segment display does not care about output values for illegal inputs .

Optimization Role

Don’t cares () can be treated as either or :

  • Assign if it helps group s into a larger subcube (eliminating literals).
  • Assign if it does not contribute to forming a larger subcube.

Specifying Boolean Functions

A Boolean function is fully specified by declaring any 2 out of 3 sets:

  • ON-set (): All input conditions yielding output .
  • OFF-set (): All input conditions yielding output .
  • Don’t Care set ( / ): All input conditions yielding output .

Subcubes, Dimensionality & Literal Reduction

Groupings of adjacent cells in a K-Map are called subcubes. Every subcube must contain a number of cells equal to a power of 2 ().

For an -variable function, an -dimensional subcube () contains cells and reduces the literal count of that product term to literals:

Subcube Dimension ()Number of Cells ()Literal Count in TermVisual Representation (3-Variable / 4-Variable)
0-cube literalsSingle isolated minterm node
1-cube literalsLine of 2 adjacent cells
2-cube literalsRectangle/Square plane of 4 cells
3-cube literalsBlock of 8 cells
-cube literalsFull map (constant function )

Golden Rule of Grouping

To achieve minimal hardware, find the smallest number of the largest possible subcubes that completely cover the ON-set.


Fundamental Implicant Terminology

TermDefinitionKey Characteristics
ImplicantAny single cell or valid subcube grouping ( cells) composed strictly of ON-set () and/or DC-set () elements.Represents a valid product term that implies the function.
Prime Implicant (PI)An implicant that cannot be combined with any adjacent subcube to form a larger subcube.Represents a maximally expanded product term (minimum literals).
Essential Prime Implicant (EPI)A Prime Implicant that covers at least one ON-set () element that is not covered by any other Prime Implicant.Must be included in every minimal SOP expression.

Don't Cares and Essentiality

Don’t Care () cells are used to expand implicants into Prime Implicants, but a PI that covers only cells (and no unique cell) is never essential and is excluded from the final cover.


Systematic Algorithm for Two-Level Logic Simplification

To find the minimum SOP expression from a K-Map:

flowchart TD
    Start([Start K-Map Minimization]) --> Step1["1. Locate all 1s and Xs on the map"]
    Step1 --> Step2["2. Form all PRIME IMPLICANTS (PIs)<br/><i>Expand 1s into largest subcubes of 1s/Xs in powers of 2</i>"]
    Step2 --> Step3["3. Identify ESSENTIAL PRIME IMPLICANTS (EPIs)<br/><i>Find 1s covered by ONLY ONE Prime Implicant</i>"]
    Step3 --> Step4["4. Add all EPIs to final SOP expression"]
    Step4 --> Decision{"5. Are all 1s covered?"}

    Decision -- Yes --> Done([Done: Output Minimal SOP])
    Decision -- No --> Step6["6. Select MINIMAL set of remaining PIs<br/><i>Cover remaining 1s prioritizing maximum overlap</i>"]
    Step6 --> Done

Algorithmic Execution Steps

  1. Find All Prime Implicants (PIs):
    • For every on the map, construct all maximal groupings of adjacent s and s (considering edges, columns, rows, and 4-corner wraps).
  2. Identify Essential Prime Implicants (EPIs):
    • Inspect each cell on the map. If a is covered by exactly one PI, that PI is Essential.
    • Mark all EPIs and include them in the final equation.
  3. Cover Remaining Uncovered s:
    • Mark all s already covered by the selected EPIs.
    • If any s remain uncovered, select the smallest set of remaining PIs that covers all remaining s.