CH 2
CH 2
Boolean algebra, like any other mathematical system, is defined with a set of elements, a set of
operators, and a number of axioms or postulates. It deals with binary variables and logic operations. A
binary operator defined on a set S of elements is a rule that assigns to each pair of elements from S a
unique element from S.
Example, consider the relation a *b = c. We say that * is a binary operator if it specifies a rule for finding
c from the pair (a, b) and also if a, b, c ϵ S. However, * is not a binary operator if a, b ϵ S, and if c is not
element of S ( ).
Boolean algebra is an algebraic structure defined also defined by a set of elements, together with two
binary operators, (+) and (.), and provided that the following (Huntington) postulates are satisfied:
Duality principle is an important property of Boolean algebra and has many applications. If the dual of
an algebraic expression is desired, we simply interchange OR and AND operators and replace 1’s by 0’s
and 0’s by 1’s.
Basic Theorems:
Table 2.1 lists six theorems of Boolean algebra and four of its postulates. The theorems and postulates
listed are the most basic relationships in Boolean algebra. The theorems, like the postulates are listed in
1
pairs: each relation is the dual of the one paired with it. The postulates are basic axioms of the algebraic
and need no proof. The theorem must be proven from the postulates.
At the right is listed the number of the postulate which justifies that particular step of the proof.
2
Operator Precedence: The operator precedence for evaluating Boolean expressions is (1)
Parenthesis, (2) NOT, (3) AND, and (4) OR. In other word, expressions inside parenthesis must be
evaluated before all other operations. The next operation that holds precedence is the complement,
and then follows the AND, finally, the OR.
Example: F = A(B + C)(C + D’)
A Boolean function can be represented in a truth table. The number of rows in the truth table is 2n,
where n is the number of variables in the function. The binary combinations for the truth table are
obtained from the binary numbers by counting from 0 through 2n – 1.
Example, Table 2.2 shows the truth table for the function F1. There are eight possible binary
combinations for assigning bits to the three variables x, y, and z. The column labeled F1 contains either 0
or 1 for each of these combinations. The table shows that the function is equal to 1 when x = 1 or when
yz = 01 and is equal to 0 otherwise.
Table 2.2: Truth Tables for F1
3
A Boolean function can be transformed from an algebraic expression into a circuit diagram composed of
logic gates connected in a particular structure. The logic‐circuit diagram (also called a schematic) for F1 is
shown in Fig. 2.1 . There is an inverter (NOT gate) for input y to generate its complement. There is an
AND gate for the term yz and an OR gate that combines x with yz.
Algebraic Manipulation
When a Boolean expression is implemented with logic gates, each term requires a gate and each
variable within the term designates an input to the gate. We define a literal to be a single variable within
a term, in complemented or un complemented form. By reducing the number of terms, the number of
literals, or both in a Boolean expression, it is often possible to obtain a simpler circuit. The manipulation
of Boolean algebra consists mostly of reducing an expression for the purpose of obtaining a simpler
circuit having less number of inputs, may reduce the cost of the implementation.
The graphical method: using Karnaugh Map method (we will see in the next chapter)
Example, Simplify the following Boolean functions to a minimum number of literals using algebraic
method:
Complement of a Function
The complement of a function F is F and is obtained from an interchange of 0’s for 1’s and 1’s for 0’s in
the value of F. The complement of a function may be derived algebraically through DeMorgan’s
theorems, listed in Table 2.1 for two variables. DeMorgan’s theorems can be extended to three or more
variables.
4
The three‐variable form of the first DeMorgan’s theorem is derived as follows, from postulates and
theorems listed in Table 2.1 :
DeMorgan’s theorems for any number of variables resemble the two‐variable case in form and can be
derived by successive substitutions similar to the method used in the preceding derivation. These
theorems can be generalized as follows:
(ABCD…….F) = A’ + B’ + C’ + D’ + ................ + F’
The generalized form of DeMorgan’s theorems states that the complement of a function is obtained by
interchanging AND and OR operators and complementing each literal.
Example, Find the complement of the functions F1 = x’yz’ + x’y’z and F2 = x(y’z’ + yz). By applying
DeMorgan’s theorems as many times as necessary, the complements are obtained as follows:
In a similar fashion, n variables forming an OR term, with each variable being primed or unprimed,
provide 2n possible combinations, called Maxterms, or standard sums. The eight maxterms for three
variables (x,y,z), together with their symbolic designations(M0, M1,…..M7) are listed in Table 2.3 . Any 2n
maxterms for n variables may be determined similarly.
Note That,
Each min-term is obtained from an AND term of the n-variables, with each variable being
primed if the corresponding bits is 0 and unprimed if 1.
Each max-term is obtained from an OR term of the n-variables, with each variable being
unprimed if the corresponding bits is 0 and primed if 1.
Each max-term is the complement of its corresponding min-term, and vice versa.
5
Table 2.3: Minterms and Maxterms for Three Binary Variables
A Boolean function can be expressed algebraically from a given truth table by forming a Minterm for
each combination of the variables that produces a 1 in the function and then taking the OR of all those
terms. For example, the function f1 in Table 2.4 is determined by expressing the combinations 001, 100,
and 111 as x’y’z, xy’z’, and xyz, respectively. Since each one of these Minterms results in f 1 = 1, we have
6
These examples demonstrate an important property of Boolean algebra: Any Boolean function can be
expressed as a sum of minterms (with “sum” meaning the ORing of terms).
Now consider the complement of a Boolean function. It may be read from the truth table by forming a
minterm for each combination that produces a 0 in the function and then ORing those terms. The
complement of f1 is read as:
These examples demonstrate a second property of Boolean algebra: Any Boolean function can be
expressed as a product of maxterms (with “product” meaning the ANDing of terms). The procedure for
obtaining the product of maxterms directly from the truth table is as follows: Form a maxterm for each
combination of the variables that produces a 0 in the function, and then form the AND of all those
maxterms. Boolean functions expressed as a sum of minterms or product of maxterms are said to be
in canonical form.
Sum of Minterms
Previously, we stated that, for n binary variables, one can obtain 2n distinct minterms and that any
Boolean function can be expressed as a sum of minterms. The minterms whose sum defines the Boolean
function are those which give the 1’s of the function in a truth table. Since the function can be either 1
or 0 for each minterm, and since there are 2n minterms, one can calculate all the functions that can be
formed with n variables to be 22n. It is sometimes convenient to express a Boolean function in its sum‐
of‐minterms form. If the function is not in this form, it can be made so by first expanding the expression
into a sum of AND terms. Each term is then inspected to see if it contains all the variables. If it misses
one or more variables, it is ANDed with an expression such as x + x’, where x is one of the missing
variables. The next example clarifies this procedure.
Example, Express the Boolean function F = A + BC as a sum of minterms. The function has three
variables: A, B, and C. The first term A is missing two variables; therefore,
A = A(B + B’) = AB + AB’
The second term B’C is missing one variable; hence, B’C = B’C(A + A’) = AB’C + A’B’C
7
But, AB’C appears twice, and according to theorem 1 (x + x = x), it is possible to remove one of those
occurrences. Rearranging the minterms in ascending order, we finally obtain
F = A’B’C + AB’C’ + AB’C + ABC’ + ABC
= m1 + m4 + m5 + m6 + m7
When a Boolean function is in its sum‐of‐minterms form, it is sometimes convenient to express the
function in the following brief notation:
F(A, B, C) = Ʃ(1, 4, 5, 6, 7)
The summation symbol Ʃ stands for the ORing of terms; the numbers following it are the indices of the
minterms of the function. The letters in parentheses following F form a list of the variables in the order
taken when the minterm is converted to an AND term.
Product of Maxterms
Each of the 22n functions of n binary variables can be also expressed as a product of maxterms. To
express a Boolean function as a product of maxterms, it must first be brought into a form of OR terms.
This may be done by using the distributive law, x + yz = (x + y)(x + z). Then any missing variable x in each
OR term is ORed with xx’. The procedure is clarified in the following example.
Example, Express the Boolean function F = xy + x’z as a product of maxterms. First, convert the function
into OR terms by using the distributive law:
F = xy + x’z = (xy + x’)(xy + z)
= (x + x’)(y + x’)(x + z)(y + z)
= (x’ + y)(x + z)(y + z)
The function has three variables: x, y, and z. Each OR term is missing one variable; therefore,
F(x, y, z) = π(0, 2, 4, 5)
The product symbol, π, denotes the ANDing of maxterms; the numbers are the indices of the maxterms
of the function.
F = xy + x’z
8
First, we derive the truth table of the function, as shown in Table 2.6. The 1’s under F in the table are
determined from the combination of the variables for which xy = 11 or xz = 01. The minterms of the
function are read from the truth table to be 1, 3, 6, and 7. The function expressed as a sum of minterms
is: F(x,y,z) = ∑ ( 1,3,6,7)
Since there is a total of eight minterms or maxterms in a function of three variables, we determine the
missing terms to be 0, 2, 4, and 5. The function expressed as a product of maxterms is:
F(x, y, z) = π(0, 2, 4, 5)
Standard Forms
The two canonical forms of Boolean algebra are basic forms that one obtains from reading a given
function from the truth table. These forms are very infrequently the ones with the least number of
literals, because each minterm or maxterm must contain, by definition, all the variables, either
complemented or uncomplemented.
Another way to express Boolean functions is in standard form. In this configuration, the terms that form
the function may contain one, two, or any number of literals. There are two types of standard forms:
the sum of products (SOP) and products of sums (POS).
The sum of products is a Boolean expression containing AND terms, called product terms, with one
or more literals each. The sum denotes the ORing of these terms. An example of a function
expressed as a sum of products is: F1 = y’ + xy + x’yz’
The expression has three product terms, with one, two, and three literals. Their sum is, in effect, an
OR operation.
The product of sums is a Boolean expression containing OR terms, called sum terms.
Each term may have any number of literals. The product denotes the ANDing of these terms. An
example of a function expressed as a product of sums is: F2 = x(y’ + z)(x’ + y + z’) . This expression
has three sum terms, with one, two, and three literals.
These Standard Form Boolean function expressions results in a two‐level structure of gates (two-level
implementation). As shown in Fig. 2.3 (a) logic diagram for sum‐of‐products and 2.3 (b) logic diagram for
product‐of‐sums.
9
A Boolean function may be expressed in a nonstandard form. For example, the function
F3 = AB + C(D + E)
F3 = AB + C(D + E) = AB + CD + CE
The sum‐of‐products expression is implemented in Fig. 2.4 (b). In general, a two‐level implementation is
preferred because it produces the least amount of delay through the gates when the signal propagates
from the inputs to the output. However, the number of inputs to a given gate might not be practical.
• Example:
– The AND and OR functions are only two of a total of 16 possible functions.
10
The truth tables for the 16 functions formed with two binary variables are listed in Table 2.7. Each of the
16 columns F0 to F15 represents a truth table of one possible functions for the two given variables x & y.
Table 2.7 Boolean Expressions for the 16 Functions of Two Variables
The 16 functions can be expressed algebraically by means of Boolean functions, as is shown in the first
column of Table 2.8.
Table 2.8: Boolean Expressions for the 16 Functions of Two Variables
11
2.6 Digital Logic Gates
Since Boolean functions are expressed in terms of AND, OR, and NOT operations, it is easier to
implement a Boolean function with these type of gates. Still, the possibility of constructing gates for the
other logic operations is of practical interest. Factors when considering the construction of other types
of logic gates are:
1. The feasibility and economy of producing the gate with physical components.
2. The possibility of extending the gate to more than two inputs.
3. The feasibility and economy of producing the gate with physical components.
4. The possibility of extending the gate to more than two inputs.
The graphic symbols and truth tables of the 8 - gates are shown in Fig. 2.5 . Each gate has one or two
binary input variables, designated by x and y, and one binary output variable, designated by F.
12
13