Skip to content
BetterDL

Circuit cost

Also called: cost of an expression, implementation cost, logic cost, hardware cost, cost metric

A measure of how expensive an expression is to build, usually counted as the number of terms, literals or gate inputs.

When we say one expression is simpler than another, we mean it is cheaper to build. Several measures are used, and they usually agree:

  • Number of terms: each multi-literal term needs its own gate.
  • literal count: each literal is one gate input.
  • gate input count: the total inputs on all gates, including the output gate. This is the measure used in this course for two-level circuits, with complemented inputs counted as free.

The usual priority for a minimal SOP or POS is fewest terms first, then fewest literals.

Real designs also weigh other costs: delay (how many gate levels a signal passes through), power, and area on the chip. A factored, multi-level form can have fewer gate inputs but more delay than the two-level SOP.

Cost is also why it pays to compare forms. A function's canonical forms are always correct but expensive, and its minimal SOP and minimal POS can differ in cost.

Worked example

Example

Canonical versus minimal

Compare the cost of F(A, B, C) = Σm(0, 4, 5, 7) as a canonical SOP and as its minimal SOP .

  1. 1.

    Canonical: 4 minterms × 3 literals = 12 literals. Gate inputs: 12 on the ANDs + 4 on the OR = 16.

  2. 2.

    Minimal: 2 terms, 4 literals. Gate inputs: 4 on the ANDs + 2 on the OR = 6.

  3. 3.

    Same function, less than half the gate inputs.

Common mistakes

  • Comparing expressions by length on the page. Count terms and literals.

  • Assuming the same literal count means the same gate-input count. Single-literal terms skip the first level.

Practice Circuit cost

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Circuit cost is taught in Boolean Simplification and Boolean Algebra.