Skip to content
BetterDL

Gate-input count

Also called: gate input count, gate-input cost, gate input cost, gate inputs, number of gate inputs

The total number of inputs on all the gates of a circuit, used to compare the cost of two-level implementations.

The gate-input count adds up the input pins on every gate. It is a simple, widely used measure of hardware cost, because each input costs transistors and wiring.

The convention in this course for a two-level SOP circuit:

  • Complemented inputs are free: no inverters are counted.
  • Each product term with 2 or more literals needs an AND gate with one input per literal.
  • A single-literal term needs no AND gate; it goes straight into the OR.
  • The OR gate has one input per term. (If there is only one term, there is no OR.)

For a POS, swap AND and OR.

So the count is roughly the literal count plus the number of terms, minus nothing for single literals, which skip the first level. That is why two expressions with the same literal count can still differ in gate-input count.

The gate-input count rewards both fewer terms and fewer literals, and it is the cost a minimal sop or minimal pos usually tries to minimize. See also circuit cost.

Worked examples

Example

Counting an SOP

What is the gate-input count of the AND-OR circuit for ?

  1. 1.

    AND gates: has 2 inputs, has 2, has 2. Total 6.

  2. 2.

    C is a single literal, so it needs no AND gate.

  3. 3.

    The OR gate takes all four terms: 4 inputs.

  4. 4.

    Gate-input count: 6 + 4 = 10.

Example

Counting a POS

What is the gate-input count of the OR-AND circuit for ?

  1. 1.

    OR gates: 2 inputs and 3 inputs. Total 5.

  2. 2.

    The AND gate takes both sums: 2 inputs.

  3. 3.

    Gate-input count: 5 + 2 = 7.

Common mistakes

  • Giving a single-literal term its own AND gate.

  • Forgetting the inputs of the output gate.

  • Counting inverters when the convention says complemented inputs are free.

Practice Gate-input count

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

Learn it step by step

Gate-input count is taught in Boolean Simplification and Karnaugh Maps.