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.