Forms of Boolean Expressions

Introduction

There are several forms of Boolean expressions used for representing Boolean functions. Although not a specific form of a Boolean expression, we begin this section with a procedure for taking the complement of a Boolean expression.

Complement

From DeMorgan's theorem we can develop an easy way to form the complement of a Boolean expression.

DeMorgan's theorem states:

(X + Y)' = X' * Y'

DeMorgan's theorem can be extended to 3 or more variables.

Given, (X + Y + Z)'

Let A = Y + Z

(X + A)' = (X' * A')

Substituting back in Y + Z

= (X' * (Y + Z)')

= X' * Y' * Z'

You can use the same idea to form the complement of an expression with mixed operators. For example:

(X * Y + Z)

Let A = X * Y

From this we can conclude that the compliment of a function can be obtained by interchanging AND's and OR's and complementing each literal.

For example,

The complement of: A + B' * C is

A' * (B + C')

Notice that we had to include the parenthesis in the second expression because we don't want to change the order of the evaluation. (Remember, that in the absence of parenthesis AND has precedence over OR.)

Another example,

The complement of: A * C + (1 * A) is

(A' + C') * (0 + A')

Canonical Forms

There are an infinite number of expressions for every Boolean function. For example,

G = X + Y' * Z

can also be expressed as:

G = X + X + Y' * Z

A Boolean expression in canonical form is unique. There are two canonical forms we will study in this section: sum-of-products and product-of-sums. Both define a unique way to represent a Boolean function. As part of defining these forms we will formalize a procedure for converting the truth table representation of a function into a Boolean expression.

A Boolean function of x variables has 2x rows in it's truth table. Each row corresponds to a particular assignment of binary values to the input variables. A minterm is a Boolean function that is 1 in only one row of the truth table. For example, the function:

G1(x,y,z) = x y' z'

is equal to one only in row 4 of its truth table. This is when the input x=1, y=0, z=0 is received.

In other words, x y' z' is a minterm that covers row 4 in a truth table of 3 variables.

Minterms can be used to form the unique expression of a Boolean function. For example, function F1 defined by the truth table on the right can be written as:

F1 = X'Y'Z' + X'YZ + XYZ'

The function includes a minterm from every row F1 is equal to 1. The minterms are listed in ascending order according to the input values they select for.

Row xyz Minterm Maxterm F1 F2
0 000 x' y' z' x + y + z 1 0
1 001 x' y' z x + y + z' 0 1
2 010 x' y z' x + y' + z 0 0
3 011 x' y z x + y' + z' 1 0
4 100 x y' z' x' + y + z 0 1
5 101 x y' z x' + y + z' 0 1
6 110 x y z' x' + y' + z 1 1
7 111 x y z x' + y' + z' 0 1

Truth table for 2 3-variable functions

Note: the functions F1 and F2 above are example functions with arbitrary values. There is no way to compute the values of F1 and F2 from the minterms given.

This canonical form of the expression is called sum-of-minterms because of the + operator's resemblance to addition.

Example 1. Express the following function as a sum of minterms:

F2 = X + Y' * Z

There are two ways to solve this problem.

#1. You could derive the truth table for the expression and then record the minterms from the truth table. The function F2 is show in the table above. Reading the minterms from the truth table, the answer is:

F2 = X'Y'Z + XY'Z' + XY'Z + XYZ' + XYZ

= sum.gif (83 bytes)m(1, 4,5,6,7)

#2. Or, you could algebraically add the missing variables.

X + Y'Z

X(Y + Y')(Z + Z') + Y'Z(X + X')

(XY + XY')(Z + Z') + Y'ZX + Y'ZX'

XYZ + XYZ' + XY'Z + XY'Z' + XY'Z + X'Y'Z

The canonical form of the expression requires the terms to be listed in ascending order with no duplicates:

X'Y'Z + XY'Z' + XY'Z + XYZ' + XYZ

Closely related to the sum-of-minterms form of a Boolean function is the product-of-maxterms canonical form of a Boolean expression.

A maxterm is a Boolean function that is 0 in only one row of the truth table. For example, the function:

G2(x,y,z) = x' + y + z

is equal to zero only in row 4 of its truth table. This is when the input x=1, y=0, z=0 is received.

Maxterms provide another unique complementary way of writing a Boolean function. For example, function F1 defined by the truth table above can be written as:

F1 = (x + y + z') (x + y' + z) (x' + y + z) (x' + y + z') (x' + y' + z')

The function includes a maxterm from every row F1 is equal to 0. The maxterms are listed in ascending order according to the input values they select for.

A minterm evaluates to 1 for one set of inputs and 0 for all others. A maxterm evaluates to 0 for one set of inputs and 1 for all others. Minterms look for a set of input values that cause the function to evaluate to 1, and maxterms look for a set of input values that cause the function to evaluate to 0. An expression in sum-of-products form evaluates to 1 if any minterm evaluates to 1. An expression in product-of-sums form evaluates to 1 if no maxterm evaluates to 0.

Example 2. Express the following function as a product of maxterms:

F2 = X + Y' * Z

Again, you can solve this by constructing the truth table or algebraic manipulations.

#1. The function F2 is show in the table above. Reading the maxterms from the truth table, the answer is:

F2 = (X + Y + Z) (X + Y' + Z) (X + Y' + Z')

= product.gif (95 bytes)M(0,2,3)

#2. Or, you could algebraically add the missing variables.

X + Y'Z

(X + Y') (X + Z)

(X + Y' + ZZ')(X + Z + YY')

(X + Y' + Z) (X + Y' + Z') (X + Z + Y) (X + Z + Y')

(X + Y' + Z) (X + Y' + Z') (X + Y + Z) (X + Y' + Z)

(X + Y' + Z) (X + Y' + Z') (X + Y + Z)

(X + Y + Z) (X + Y' + Z) (X + Y' + Z')

Note, the symmetry between the sum-of-products and products-of-sums form of an expression. If mi is the minterm for row i, and Mi is the maxterm for row i:

mi' = Mi

To convert from one canonical form to another interchange the sum.gif (83 bytes)and product.gif (95 bytes)signs and replace the row numbers with those not included in the original form. For example,

product.gif (95 bytes)M(2,4,6) = sum.gif (83 bytes)m(0,1,3,5,7)

Another important form of a Boolean expression is standard form. The standard from of a Boolean expression has the same basic sum-of-products and product-of-sums form, but with standard form the terms aren't required to be minterms or maxterms. For example, the following expression is in sum-of-products standard form:

XY + X'Y'Z

The following expression is is product-of-sums standard form:

(Y + X)(X' + Z)(Y)

The following expression isn't in either standard form:

Y(X + Z(X + Y'))

What about the following expression? Is it in standard form?

X(Y + Z)

Yes, it is in product-of-sums standard form.

In summary,

Standard Forms:

Canonical Forms:

Later we will study algorithmic techniques for finding the minimized standard form of a Boolean expression.