A literal is one appearance of a variable, with or without a bar. For two variables A and B there are four possible literals: A, , B and .
Literals are the smallest building blocks of an expression. A product term is an AND of literals, such as . A sum term is an OR of literals, such as .
Why the word matters: when you measure how expensive an expression is, you count literals. Each literal is one wire going into a gate, so fewer literals usually means a smaller, cheaper circuit. See literal count.
Two details trip people up:
- A plain literal (A) is 1 when A = 1. A complemented literal () is 1 when A = 0.
- A bar over a whole group, as in , is not a literal. Only a bar over a single letter makes a complemented literal. Use de morgans laws to push a long bar down onto single letters.