Computing Library › Classical Logic Gates
Classical Logic Gates

Sum of Products

Sum-of-products expresses a function as an OR of AND terms, read directly from the rows of a truth table that output 1.

The form

A sum-of-products, or SOP, expression is an OR (the sum) of several AND terms (the products). Each product is a group of inputs, some complemented, ANDed together. The whole function is 1 when any one product is 1.

Reading it from a truth table

Kronos motion — cta read papers

For every row where the output is 1, write a product that is true only for that row: include each input plain if it is 1 in that row and complemented if it is 0. ORing these products reproduces the function exactly. Such full products are called minterms.

Worked example

ABOUT
000
011
101
110

The output is 1 in two rows, giving OUT = (NOT A AND B) OR (A AND NOT B). That is exactly the XOR function.

Canonical versus minimized

Why it maps to hardware

SOP corresponds to a two-level AND-OR network: a bank of AND gates feeding a single OR gate. This regular structure is the basis of programmable logic arrays and is easy to reason about and to lay out.

Its dual, the product-of-sums, is read from the 0-rows instead and gives an OR-AND network.