Definitionintro
Sum of products
Also called SOP form, two-level AND-OR form.
A Boolean formula that is an OR of product terms, each an AND of literals, the form of two-level logic and of programmable logic arrays.
A sum of products (SOP) is a Boolean formula that is an OR of product terms, where each product term is an AND of literals. A literal is a variable or its complement . An example is . Each product term is true on a subcube of , so an SOP is also a set of cubes, called a cover. Every Boolean function has an SOP: take one term for each input where the function is 1. In logic the same form is the disjunctive normal form (DNF). In hardware it is two-level logic: one AND gate for each term and one OR gate, or one row of a programmable logic array (PLA) for each term. The number of terms and the number of literals are the usual costs, and making them small is two-level logic minimization.
Definition
Let be Boolean variables. A literal is or . In a product, is true when and is true when .
Product term, or cube. A product term is an AND of literals in which no variable occurs twice. The term with no literal is the constant 1. A term with literals is true on a set of points of . This set is a subcube of dimension , and we use the same word, cube, for the term and for its set of points. A cube has a positional notation: a string , where means the literal , means , and means that does not occur. So over three variables is . There are cubes. A minterm is a cube with all literals, that is, one point of . We number the minterms by the binary number , with as the high bit.
Sum of products. A sum of products is a finite set of cubes, read as the formula
The empty set is the constant 0. The set of points where is 1 is the union of the cubes of . If , then is an SOP of , or a cover of .
Cost. The cost of is the pair (number of cubes , number of literals ), where is the number of literals of . Two-level tools compare the number of cubes first and the literals second. The number of cubes is the number of AND gates, or of PLA rows. The number of literals is the number of AND inputs.
Canonical SOP. The canonical SOP, or sum of minterms, of has one minterm for each point with . It is unique, and it is the only SOP of that has only minterms. One writes with the list of minterm numbers.
Examples and non-examples
Sums of products.
- is the cover . It is 1 on the minterms , so . Its cost is 2 cubes and 4 literals.
- The majority of three inputs is , 3 cubes and 6 literals. Its canonical SOP has 4 cubes and 12 literals.
- One function has many SOPs. The cover and the cover both give the OR of and . The second one has fewer literals because is a larger cube than .
- The constant 1 is the cover with one cube and no literal. The constant 0 is the empty cover.
- Parity needs cubes in every SOP. A cube that misses a variable contains two points that differ only in , and parity is 0 at one of them. So every cube of a parity SOP is a minterm, and parity has minterms. The Shannon expansion page gives the same proof and compares it with the BDD of parity, which has nodes.
Non-examples.
- is an AND of sums, not an SOP. Multiplied out it is the SOP . An AND of sums of literals is the conjunctive normal form, the dual form.
- is not an SOP, because the complement covers a product, not a literal. By De Morgan's law it is the SOP .
- is not a product term in the sense above, because occurs twice. It is the constant 0, the empty set of points, and covers write it as no cube at all.
- is not an SOP as written. Its SOP is .
SOP and CNF sizes. The two forms can differ by an exponential factor. The SOP has cubes. Let be a clause of a CNF of . Set each variable that is a positive literal of to 0 and each other variable to 1. Then is false, so must be 0, so for each the clause has the positive literal or . Now pick one variable from each pair, and let be the point with all and all other variables 1. Then , so some clause is false at . Its positive literals hit every pair and are all 0 at , so they are exactly . The choices give different clauses, so every CNF of has at least clauses. Parity has clauses in every CNF too, by the same argument as for its SOP.
Related definitions
- Boolean function. The object an SOP describes. A function has one truth table and many SOPs.
- Implicant and prime implicant. A cube that can be part of an SOP of , and such a cube that no larger cube can replace. Some minimum SOP of each function uses only prime implicants.
- Don't-care condition. Inputs where the value of is free. An SOP then has to match only on the other inputs.
- Two-level logic minimization. The problem of finding an SOP of least cost. The Karnaugh map, Quine-McCluskey and Espresso solve it by hand, exactly and heuristically.
- Conjunctive normal form. The dual two-level form, an AND of OR clauses. The SOP of , with De Morgan's law, gives a CNF of .
- Unate function. A function with an SOP in which each variable appears in one polarity only.
- Boolean network. A circuit of many levels, where each node holds a small SOP. This is the object of multi-level logic synthesis.
- Circuit complexity. An SOP is a circuit of depth 2 with unbounded fan-in, and the parity bound above is the base case of the lower bounds for constant-depth circuits.
References
- Robert K. Brayton, Gary D. Hachtel, Curtis T. McMullen and Alberto L. Sangiovanni-Vincentelli, Logic Minimization Algorithms for VLSI Synthesis, Kluwer, 1984, Chapter 2, Basic Definitions, Section 2.3, Cubes and Covers
- Giovanni De Micheli, Synthesis and Optimization of Digital Circuits, McGraw-Hill, 1994, Chapter 7, Two-Level Combinational Logic Optimization
- Gary D. Hachtel and Fabio Somenzi, Logic Synthesis and Verification Algorithms, Kluwer, 1996, Chapter 4, Synthesis of Two-Level Circuits
- Donald E. Knuth, The Art of Computer Programming, Volume 4A, Combinatorial Algorithms, Part 1, Addison-Wesley, 2011, Section 7.1.1, Boolean basics (disjunctive normal forms)
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag M58QRA Edit this page History Report an error Markdown