The literal count of an expression is how many times a literal appears in it, counting every appearance of every letter, barred or not.
- has 6 literals.
- has 3.
- A canonical SOP with m minterms in n variables has m × n literals, because each minterm contains every variable.
Why count literals? In a two-level circuit, each literal in a multi-literal term is one input wire on an AND gate (or an OR gate, for a POS). So the literal count tracks the hardware cost. Together with the number of terms it decides which expression is simpler:
- fewer terms first (fewer gates),
- then fewer literals (fewer gate inputs).
That is the usual definition of a minimal sop.
The literal count is close to, but not the same as, the gate input count, which also counts the inputs of the output gate and does not need an AND gate for a single-literal term.