0% found this document useful (0 votes)
5 views

L7 Boolean Function and Minimization

Uploaded by

Kadega Hamad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

L7 Boolean Function and Minimization

Uploaded by

Kadega Hamad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Boolean Function

Boolean Function
Boolean algebra is an algebra that deals with binary variables and logic operations.
A Boolean function described by an algebraic expression consists of binary variables, the
constants 0 and 1, and the logic operation symbols.
For a given value of the binary variables, the function can be equal to either 1 or 0.
F(vars) = expression

Set of binary Variables Operators (+, •, ‘)


Constants (0, 1)
Groupings (parenthesis)
Variables
Consider an example for the Boolean function
F1 = x + y’z
DIGITAL LOGIC DESIGN Page no. 31
The function F1 is equal to 1 if x is equal to 1 or if both y’ and z are equal to 1. F1 is equal to 0
otherwise. The complement operation dictates that when y’ = 1, y = 0. Therefore, F1 = 1 if x = 1
or if y = 0 and z = 1.
A Boolean function expresses the logical relationship between binary variables and is evaluated
by determining the binary value of the expression for all possible values of the variables.
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 2 n - 1.

Truth Table for F1

x y z F1
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 Gate Implementation of F1 = x + y’z
1 1 0
1 1 1 1

Note:
Q: Let a function F() depend on n variables. How many rows are there in the truth table of F() ?
A: 2n rows, since there are 2n possible binary patterns/combinations for the n variables.

Truth Tables

• Enumerates all possible combinations of variable values and the corresponding function
value
• Truth tables for some arbitrary functions
F1(x,y,z), F2(x,y,z), and F3(x,y,z) are shown to the below.

x y z F1 F2 F3
0 0 0 0 1 1
0 0 1 0 0 1

DIGITAL LOGIC DESIGN Page no. 32


0 1 0 0 0 1
0 1 1 0 1 1
1 0 0 0 1 0
1 0 1 0 1 0
1 1 0 0 0 0
1 1 1 1 0 1

• Truth table: a unique representation of a Boolean function


• If two functions have identical truth tables, the functions are equivalent (and vice-
versa).
• Truth tables can be used to prove equality theorems.
• However, the size of a truth table grows exponentially with the number of variables
involved, hence unwieldy. This motivates the use of Boolean Algebra.
Boolean expressions-NOT unique
Unlike truth tables, expressions epresenting
x y z F G
a Boolean function are NOT unique.
• Example: 0 0 0 1 1
– F(x,y,z) = x’•y’•z’ + x’•y•z’ +
0 0 1 0 0
x•y•z’
– G(x,y,z) = x’•y’•z’ + y•z’ 0 1 0 1 1
• The corresponding truth tables for
F() and G() are to the right. They are 0 1 1 0 0
identical. 1 0 0 0 0
• Thus, F() = G()
1 0 1 0 0
1 1 0 1 1
1 1 1 0 0

Algebraic Manipulation (Minimization of Boolean function)


• Boolean algebra is a useful tool for simplifying digital circuits.
• Why do it? Simpler can mean cheaper, smaller, faster.
• Example: Simplify F = x’yz + x’yz’ + xz.
F= x’yz + x’yz’ + xz
= x’y(z+z’) + xz
= x’y•1 + xz
DIGITAL LOGIC DESIGN Page no. 33
= x’y + xz

• Example: Prove
x’y’z’ + x’yz’ + xyz’ = x’z’ + yz’
• Proof:
x’y’z’+ x’yz’+ xyz’
= x’y’z’ + x’yz’ + x’yz’ + xyz’
= x’z’(y’+y) + yz’(x’+x)
= x’z’•1 + yz’•1
= x’z’ + yz’

Complement of a Function
• The complement of a function is derived by interchanging (• and +), and (1 and 0), and
complementing each variable.
• Otherwise, interchange 1s to 0s in the truth table column showing F.
• The complement of a function IS NOT THE SAME as the dual of a function.
Example
• Find G(x,y,z), the complement of F(x,y,z) = xy’z’ + x’yz
Ans: G = F’ = (xy’z’ + x’yz)’
= (xy’z’)’ • (x’yz)’ DeMorgan
= (x’+y+z) • (x+y’+z’) DeMorgan again
Note: The complement of a function can also be derived by finding the function’s dual, and
then complementing all of the literals

Canonical and Standard Forms

We need to consider formal techniques for the simplification of Boolean functions.


Identical functions will have exactly the same canonical form.
• Minterms and Maxterms
• Sum-of-Minterms and Product-of- Maxterms
• Product and Sum terms
• Sum-of-Products (SOP) and Product-of-Sums (POS)

Definitions
Literal: A variable or its complement
Product term: literals connected by •
Sum term: literals connected by +
Minterm: a product term in which all the variables appear exactly once, either complemented or
uncomplemented.
DIGITAL LOGIC DESIGN Page no. 34
Maxterm: a sum term in which all the variables appear exactly once, either complemented or
uncomplemented.
Canonical form: Boolean functions expressed as a sum of Minterms or product of Maxterms are said to be
in canonical form.

Minterm
• Represents exactly one combination in the truth table.
• Denoted by mj, where j is the decimal equivalent of the minterm’s corresponding binary
combination (bj).
• A variable in mj is complemented if its value in bj is 0, otherwise is uncomplemented.

Example: Assume 3 variables (A, B, C), and j=3. Then, bj = 011 and its corresponding minterm is denoted
by mj = A’BC

Maxterm

• Represents exactly one combination in the truth table.


• Denoted by Mj, where j is the decimal equivalent of the maxterm’s corresponding binary
combination (bj).
• A variable in Mj is complemented if its value in bj is 1, otherwise is uncomplemented.

Example: Assume 3 variables (A, B, C), and j=3. Then, bj = 011 and its corresponding maxterm is denoted
by Mj = A+B’+C’
Truth Table notation for Minterms and Maxterms
• Minterms and Maxterms are easy to denote using a truth table.
Example: Assume 3 variables x,y,z (order is fixed)

x y z Minterm Maxterm
0 0 0 x’y’z’ = m0 x+y+z = M0
0 0 1 x’y’z = m1 x+y+z’ = M1
0 1 0 x’yz’ = m2 x+y’+z = M2
0 1 1 x’yz = m3 x+y’+z’= M3
1 0 0 xy’z’ = m4 x’+y+z = M4
1 0 1 xy’z = m5 x’+y+z’ = M5
1 1 0 xyz’ = m6 x’+y’+z = M6
1 1 1 xyz = m7 x’+y’+z’ = M7

Canonical Forms
DIGITAL LOGIC DESIGN Page no. 35
• Every function F() has two canonical forms:
– Canonical Sum-Of-Products (sum of minterms)
– Canonical Product-Of-Sums (product of maxterms)
Canonical Sum-Of-Products:
The minterms included are those mj such that F( ) = 1 in row j of the truth table for F( ).
Canonical Product-Of-Sums:
The maxterms included are those Mj such that F( ) = 0 in row j of the truth table for F( ).

Example a b c f1
Consider a Truth table for f1(a,b,c) at right 0 0 0 0
The canonical sum-of-products form for f1 is
0 0 1 1
f1(a,b,c) = m1 + m2 + m4 + m6
= a’b’c + a’bc’ + ab’c’ + abc’ 0 1 0 1
The canonical product-of-sums form for f1 is 0 1 1 0
f1(a,b,c) = M0 • M3 • M5 • M7
1 0 0 1
= (a+b+c)•(a+b’+c’)• (a’+b+c’)•(a’+b’+c’).
1 0 1 0
• Observe that: mj = Mj’ 1 1 0 1
1 1 1 0

DIGITAL LOGIC DESIGN Page no. 36


Shorthand: ∑ and ∏
• f1(a,b,c) = ∑ m(1,2,4,6), where ∑ indicates that this is a sum-of-products form, and m(1,2,4,6)
indicates that the minterms to be included are m1, m2, m4, and m6.
• f1(a,b,c) = ∏ M(0,3,5,7), where ∏ indicates that this is a product-of-sums form, and M(0,3,5,7)
indicates that the maxterms to be included are M0, M3, M5, and M7.
• Since mj = Mj’ for any j,
∑ m(1,2,4,6) = ∏ M(0,3,5,7) = f1(a,b,c)

Conversion between Canonical Forms
• Replace ∑ with ∏ (or vice versa) and replace those j’s that appeared in the original form with those
that do not.
• Example:
f1(a,b,c)= a’b’c + a’bc’ + ab’c’ + abc’
= m1 + m2 + m4 + m6
= ∑(1,2,4,6)
= ∏(0,3,5,7)
= (a+b+c)•(a+b’+c’)•(a’+b+c’)•(a’+b’+c’)
Standard Forms

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 and products of sums.
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.
A 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. The product is an AND operation.

DIGITAL LOGIC DESIGN Page no. 37


Conversion of SOP from standard to canonical form
Example-1.
Express the Boolean function F = A + B’C as a sum of minterms.
Solution: The function has three variables: A, B, and C. The first term A is missing two variables; therefore,
A = A(B + B’) = AB + AB’
This function is still missing one variable, so
A = AB(C + C’) + AB’ (C + C’)
= ABC + ABC’ + AB’C + AB’C’
The second term B’C is missing one variable; hence,
B’C = B’C(A + A’) = AB’C + A’B’C
Combining all terms, we have
F = A + B’C
= ABC + ABC’ + AB’C + AB’C’+ A’B’C
But AB’C appears twice, and according to theorem (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) = ∑m (1, 4, 5, 6, 7)

Example-2.
Express the Boolean function F = xy + x’z as a product of maxterms.
Solution: 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,
x’+ y = x’ + y + zz’ = (x’ + y + z)(x’ + y + z’)
x + z = x + z + yy’ = (x + y + z)(x + y’ + z)
y + z = y + z + xx’ = (x + y + z)(x’ + y + z)
Combining all the terms and removing those which appear more than once, we finally obtain
F = (x + y + z)(x + y’ + z)(x’ + y + z)(x’ + y + z)
F= M0M2M4M5
A convenient way to express this function is as
follows: F(x, y, z) = πM(0, 2, 4, 5)
The product symbol, π, denotes the ANDing of maxterms; the numbers are the indices of the maxterms of
the function.

DIGITAL LOGIC DESIGN Page no. 38

You might also like