0% found this document useful (0 votes)
50 views18 pages

Chapter 12

Uploaded by

r.abouelenin3009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views18 pages

Chapter 12

Uploaded by

r.abouelenin3009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Boolean Algebra

◎ Part 2: Representing Boolean Functions

1
Two important Boolean algebra problems

1. Given the values of a Boolean function, how can a Boolean


expression that represents this function be found?
○ Will be solved by showing that any Boolean function can be
represented by a Boolean sum of Boolean products of the variables
and their complements.
2. Is there a smaller set of operators that can be used to
represent all Boolean functions?
○ Will be answered by showing that all Boolean functions can be
represented using only one operator.

Both of these problems have practical importance in circuit design.


2
Representing Boolean Functions
• Sum-of-products Expansions
 Disjunctive Normal Form (DNF) orSum-of-Products Form (SOPs)
• Product-of-sums Expansions
 Conjunctive Normal Form (CNF) or Product-of-Sums Form
(POSs)
• Functional Completeness
 Minimal functionally complete sets of operators.

3
Constructing Boolean Expressions that
represent a Boolean Function
Example: Find Boolean expressions that represent the
functions F(x, y, z) and G(x, y, z), which are given in the table.

Solution:
• An expression that has the value 1 when x = z = 1 and
y = 0, and the value 0 otherwise, is needed for F. It can
be formed by taking the Boolean product of x, 𝑦,
ത and z
i.e. x𝑦z.

• For G, we need an expression that equals 1 when x =
y = 1 and z = 0, or x = z = 0 and y = 1. It can be formed
by taking the Boolean sum of two different Boolean
products. The expression: xy𝑧ҧ + 𝑥yҧ 𝑧ҧ represents G.
4
Comments on the previous example

◎ The example illustrates a procedure for constructing a


Boolean expression representing a function with given values.

◎ Each combination of values of the variables for which the


function has the value 1 leads to a Boolean product of the
variables or their complements.

5
Definitions: Literals, Minterms, Maxterms

• A literal is a Boolean variable or its complement.


• A minterm of Boolean variables x1,…,xn is a Boolean product
of n literals y1…yn, where yi = xi , or yi = 𝑥ҧ𝑖 .
• A maxterm of Boolean variables x1,…,xn is a Boolean sum of
n literals y1…yn, where yi = xi , or yi = 𝑥ҧ𝑖 .

6
Examples on minterms
1. Find a minterm that equals 1 if x1 = x3 = 0 and x2 = x4 =
x5 = 1, and equals 0 otherwise.
Solution:
The minterm: 𝑥ҧ1 𝑥2 𝑥ҧ3 𝑥4 𝑥5

2. Find a Boolean product of the Boolean variables x, y,


and z, or their complements, that has the value 1 if
and only if x = y = 0, z = 1.
Solution:
The minterm: 𝑥ҧ 𝑦𝑧ത
7
Sum-Of-Products (SOP) Expansion
◎ By taking Boolean sums of distinct minterms we can build up a Boolean
expression with a specified set of values.
◎ In particular, a Boolean sum of minterms has the value 1 when exactly
one of the minterms in the sum has the value 1. It has the value 0 for all
other combinations of values of the variables.
◎ Consequently, given a Boolean function, a Boolean sum of minterms can
be formed that has the value 1 when this Boolean function has the value
1, and has the value 0 when the function has the value 0.
◎ The minterms in this Boolean sum correspond to those combinations of
values for which the function has the value 1.
◎ The sum of minterms that represents the function is called the sum-of-
products expansion or the disjunctive normal form of the Boolean
function.
8
Sum-of-Products (SOP) Expansion
• Theorem: Any Boolean function can be represented
as a sum-of-products of variables and their
complements.
– Proof: By construction from the function’s truth
table. For each row that has a function value 1,
include a product term in the sum that represents
the variables values given for that row.

9
Disjunctive Normal Form (DNF)
Sum-of-Products (SOP)

• The Disjunctive Normal Form (DNF) of Boolean function f, of a


degree-n, is the unique sum of minterms of the variables x1,…,xn that
represents f.

• A DNF is a sum-of-products representation.

10
SOP Example – Solution (1)
◎ Find the sum-of-products expansion for the function
𝐹 𝑥, 𝑦, 𝑧 = (𝑥 + 𝑦)𝑧.ҧ
Solution (1):

11
SOP Example – Solution (2)

◎ We can construct the SOP expansion by


determining the values of F for all possible
values of the variables x, y, and z, as in
table.
◎ The SOP expansion of F is the Boolean
sum of three minterms corresponding to
the three rows of this table that give the
value 1 for the function. This gives:

12
Product-of-Sums (POS) Expansion
◎ It is also possible to find a Boolean expression that represents
a Boolean function by taking a Boolean product of Boolean
sums.
◎ The resulting expansion is called the conjunctive normal form
or product-of-sums expansion of the function.
◎ The Conjunctive Normal Form (CNF) of Boolean function f, of a
degree-n, is the unique product of maxterms of the variables
x1,…,xn that represents f.
◎ A CNF is a product-of-sums representation.
◎ These expansions can be found from SOP expansions by
taking duals.

13
POS Example
Find the POS expansion of the Boolean function:
𝐹 𝑥, 𝑦, 𝑧 = 𝑥 𝑦.

Solution: 𝒙 𝒚 𝒛 ഥ 𝒙ഥ
𝒚 𝒚

• First we construct the table of values for 𝐹 𝑥, 𝑦, 𝑧 : 0 0 0 1 0


0 0 1 1 0

• We then find the six maxterms that have value of 0 0 1 0 0 0


0 1 1 0 0
and construct their product: 1 0 0 1 1
1 0 1 1 1
𝐹 𝑥, 𝑦, 𝑧 = 𝑥 + 𝑦 + 𝑧 𝑥 + 𝑦 + 𝑧ҧ 𝑥 + 𝑦ത + 𝑧 1 1 0 0 0
(𝑥 + 𝑦ത + 𝑧)(
ҧ 𝑥ҧ + 𝑦ത + 𝑧)(𝑥ҧ + 𝑦ത + 𝑧)ҧ 1 1 1 0 0

14
Convert DNF (SOP) to CNF (POS) representation
To get the CNF representation for f,
• take the DNF (SOP) representation for complement 𝑓,ҧ 𝒙 𝒚 𝒛 ഥ
𝒙 𝑥ҧ + 𝑦
• and then complement both sides (apply De Morgan’s 0 0 0 1 1
laws) to get the CNF (POS) representation of f. 0 0 1 1 1
Example: Using the above procedure find the POS expansion 0 1 0 1 1
of the Boolean function: 0 1 1 1 1
1 0 0 0 0
𝐹 𝑥, 𝑦, 𝑧 = 𝑥𝑦. ത
Solution: 1 0 1 0 0

• 𝐹(𝑥, 𝑦, 𝑧) = 𝑥ҧ + 𝑦 (then construct table) 1 1 0 0 1

• 𝐹(𝑥, 𝑦, 𝑧) = 𝑥ҧ 𝑦ത𝑧ҧ + 𝑥ҧ 𝑦𝑧
ത + 𝑥𝑦
ҧ 𝑧ҧ + 𝑥𝑦𝑧
ҧ + 𝑥𝑦𝑧ҧ + 𝑥𝑦𝑧 1 1 1 0 1

• Complement both sides of this SOP representation and apply


De Morgan laws to get:
𝐹 𝑥, 𝑦, 𝑧 = 𝑥 + 𝑦 + 𝑧 𝑥 + 𝑦 + 𝑧ҧ 𝑥 + 𝑦ത + 𝑧
(𝑥 + 𝑦ത + 𝑧)(
ҧ 𝑥ҧ + 𝑦ത + 𝑧)(𝑥ҧ + 𝑦ത + 𝑧)ҧ
15
Row 𝒙𝒚𝒛 𝒎𝒊𝒏𝒕𝒆𝒓𝒎𝒔 𝑴𝒂𝒙𝒕𝒆𝒓𝒎𝒔
No.
0 000 𝑥ҧ 𝑦ത𝑧ҧ = 𝑚0 𝑥 + 𝑦 + 𝑧 = 𝑀0
1 001 𝑥ҧ 𝑦𝑧
ത = 𝑚1 𝑥 + 𝑦 + 𝑧ҧ = 𝑀1
2 010 𝑥𝑦
ҧ 𝑧 ҧ = 𝑚2 𝑥 + 𝑦ത + 𝑧 = 𝑀2
3 011 𝑥𝑦𝑧
ҧ = 𝑚3 𝑥 + 𝑦ത + 𝑧ҧ = 𝑀3
4 100 𝑥 𝑦ത 𝑧ҧ = 𝑚4 𝑥ҧ + 𝑦 + 𝑧 = 𝑀4
5 101 𝑥 𝑦𝑧
ത = 𝑚5 𝑥ҧ + 𝑦 + 𝑧ҧ = 𝑀5
6 110 𝑥𝑦𝑧ҧ = 𝑚6 𝑥ҧ + 𝑦ത + 𝑧 = 𝑀6
7 111 𝑥𝑦𝑧 = 𝑚7 𝑥ҧ + 𝑦ത + 𝑧ҧ = 𝑀7
ഥ0 = 𝑚0 and 𝑚
Note that: 𝑀 ഥ 7 = 𝑀7
16
Functional Completeness
• Since every Boolean function can be expressed in terms of ·,+,¯,
we say that the set of operators {·,+,¯} is functionally complete
• There are smaller sets of operators that are also functionally
complete.
– We can eliminate either · or + using De Morgan’s law.
– So, {+,¯} and {·,¯} are functionally complete.
• So, we have sets of 3 operators and sets of 2 operators that are
functionally complete. Are there sets of a single operator that are
functionally complete? See next slide.

17
Functional Completeness x y x|y x y xy

NAND, | , and NOR, ↓ operators, defined in the 00 1 00 1

tables on the right, are functionally complete, 01 1 01 0

each by itself (as a singleton set, {|} and {}). 10 1 10 0


11 0 11 0

NAND (|) NOR ()

• To see that {|} is functionally complete: Because {. ,¯} is functionally


complete, all that we have to do is show that both of the operators ・
and ¯ can be expressed using just the | operator
• Similar treatment for the case of {} can be performed. Both results are
given in the table below:
NAND NOR
𝑥ҧ = 𝑥 | 𝑥 𝑥ҧ = 𝑥 ↓ 𝑥
𝑥. 𝑦 = 𝑥 𝑦)| 𝑥 𝑦) 𝑥 + 𝑦 = (𝑥 ↓ 𝑦) ↓ (𝑥 ↓ 𝑦)
18

You might also like