You are on page 1of 17

Chapter 4.

Elementary Set Theory

Chapter 5
Boolean Algebra

5.1. Definition

Definition 5.1. Boolean Algebra


A Boolean algebra is a set 𝐵 together with two operations, generally denoted by + and ×,
such that for all 𝑥 and 𝑦 in 𝐵 both 𝑥 + 𝑦 and 𝑥 × 𝑦 are in 𝐵 and the following axioms
are assumed to hold:
1. Commutative axioms: For all 𝑥 and 𝑦 in 𝐵,
(a) 𝑥 + 𝑦 = 𝑦 + 𝑥 and (b) 𝑥 × 𝑦 = 𝑦 × 𝑥.
2. Associative axioms: For all 𝑥, 𝑦, and 𝑧 in 𝐵,
(a) (𝑥 + 𝑦) + 𝑧 = 𝑥 + (𝑦 + 𝑧) and (b) (𝑥 × 𝑦) × 𝑧 = 𝑥 × (𝑦 × 𝑧).
3. Distributive axioms: For all 𝑥, 𝑦, and 𝑧 in 𝐵,
(a) 𝑥 + (𝑦 × 𝑧) = (𝑥 + 𝑦) × (𝑥 + 𝑧) and (b) 𝑥 × (𝑦 + 𝑧) = (𝑥 × 𝑦) + (𝑥 × 𝑧).
4. Identity axioms: There exist distinct elements 0 and 1 in 𝐵 such that for each 𝑥 in 𝐵,
(a) 𝑥 + 0 = 𝑥 and (b) 𝑥 × 1 = 𝑥.
5. Complement axioms: For each 𝑥 in 𝐵, there exists an element in 𝐵, denoted by 𝑥′ and
called the complement or negation of 𝑥, such that
(a) 𝑥 + 𝑥 ′ = 1 and (b) 𝑥 × 𝑥 ′ = 0.

The above axioms may look quite familiar to you; they resemble the addition and multiplication
axioms of “normal, high school” algebra, except the “strange” distributive axiom 3(a): 𝑥 +
(𝑦 × 𝑧), which is not in “normal” algebra. In “normal” algebra, 𝑥 + 𝑦𝑧 is already in a very simple
form that you cannot do anything further.

Beyond “normal” algebra, the above axioms should also look familiar to. Not only the names are
the same as names of laws that you encountered in propositional logic and set theory (Chapters
3 and 4), but the structures also are similar. Take, for instance, the associative axiom 2(a). If 𝑥, 𝑦
and 𝑧 are propositions and the operation + represents the OR connective ∨, this axiom now reads

(𝑥 ∨ 𝑦) ∨ 𝑧 ≡ 𝑥 ∨ (𝑦 ∨ 𝑧).

Of course, you are used to symbols 𝑝, 𝑞, and 𝑟 to represent propositions. Using them in the
axiom, we have
(𝑝 ∨ 𝑞) ∨ 𝑟 ≡ 𝑝 ∨ (𝑞 ∨ 𝑟).
Chapter 4. Elementary Set Theory

This is one of the associative laws in logic. This may be a bit boring, so consider Axiom 4(b). If
the operation also represents the AND connective ∧, and 1 corresponds to 𝑇, the axiom now
reads
𝑝 ∧ 𝑇 ≡ 𝑝.

One step further, if we replace 𝑥, 𝑦, 𝑧 by the sets 𝐴, 𝐵, 𝐶, the operators + and × by ∪ and ∩,
respectively, and 1 by 𝒰, Axiom 2(a) and 4(b) can be written as
(𝐴 ∪ 𝐵) ∪ 𝐶 = 𝐴 ∪ (𝐵 ∪ 𝐶)
and
𝐴 ∩ 𝒰 = 𝐴.

These are two laws in Set Theory.

The above illustration somehow suggests a link between logic, set theory, and Boolean algebra.
In fact, we can put the propositional logic and set into Boolean algebras context, with their
associated operation laws.
• Propositional logic:
o The set 𝐵 = {𝑇, 𝐹}
o The operations: ∧ (for ×) and ∨ (for +), and the negation ¬ (for ′) defined in 𝐵
• Set:
o The set 𝐵 = 𝑃(𝒰), where 𝒰 is a universal set and 𝑃(𝒰) the power set of 𝒰.
o The operations: ∩ (for ×) and ∪ (for +), and the complement ⋅𝐶 (for ′), defined
in 𝐵

Example 1.
Show that 𝑥 + 𝑥 = 𝑥 and 𝑥 × 𝑥 = 𝑥.
Answer.
These are called idempotent laws. To show that the two laws hold, we shall use the axioms.
𝑥 + 𝑥 = (𝑥 + 𝑥) × 1 (Identity axiom (4(b))
= (𝑥 + 𝑥) × (𝑥 + 𝑥 ′ ) (Complement axiom 5(a))
= 𝑥 + (𝑥 × 𝑥 ′ ) (Distributive axiom 3(a))
=𝑥+ 0 (Complement axiom 5(b))
=𝑥 (Identity axiom 4(a))
Now,
𝑥 × 𝑥 = (𝑥 × 𝑥) + 0 (Identity axiom (4a))
= (𝑥 × 𝑥) + (𝑥 × 𝑥 ′ ) (Complement axiom 5(b))
= 𝑥 × (𝑥 + 𝑥 ′ ) (Distributive axiom 3(a))
=𝑥× 1 (Complement axiom 5(a))
=𝑥 (Identity axiom 4(b))
Chapter 4. Elementary Set Theory

Example 2.
Show that 𝑥 × 0 = 0.
Answer.
This is one of the annihilation laws. To show that this law holds, we again shall use the
axioms.
𝑥 × 0 = (𝑥 × 0) + 0 (Identity axiom (4(a))
= (𝑥 × 0) + (𝑥 × 𝑥 ′ ) (Complement axiom 5(b))
= 𝑥 × (0 + 𝑥 ′ ) (Distributive axiom 3(b))
=𝑥× 𝑥′ (Identity axiom 4(a))
=0 (Complement axiom 4(a))

Table 1 lists Boolean algebra laws, which can be proved just by using the axioms.
Table 1. Boolean algebra laws
Double Complement law (𝑥 ′ )′ = 𝑥 ′′ = 𝑥
Annihilation law 𝑥×0= 0 𝑥+1 =1
De Morgan’s law (𝑥 × 𝑦)′ = 𝑥 ′ + 𝑦′ (𝑥 + 𝑦)′ = 𝑥 ′ × 𝑦′
Absorption law 𝑥 × (𝑥 + 𝑦) = 𝑥 𝑥 + (𝑥 × 𝑦) = 𝑥
Complement law 1′ = 0 0′ = 1

Exercise 5.1. Rewrite the Boolean algebra laws in Table 1 as laws of logic and set.

Exercise 5.2. Prove that 𝑥 + 1 = 1.


Exercise 5.3. Prove that (𝑥 × 𝑦)′ = 𝑥 ′ + 𝑦′.
Exercise 5.4. Prove that 𝑥 + (𝑥 × 𝑦) = 𝑥.
Exercise 5.5. Prove that 𝑥 ′′ = 𝑥.

Example 3.
Simplify 𝑥 × (𝑤 + 𝑥 + 𝑦 + 𝑧).
Answer.
𝑥 × (𝑤 + 𝑥 + 𝑦 + 𝑧) = 𝑥 × (𝑥 + 𝑤 + 𝑦 + 𝑧) (Commutative axiom)
(𝑤 + 𝑦 + 𝑧))
= 𝑥 × (𝑥 + ⏟ (Associative axiom)
𝑣

= 𝑥 × (𝑥 + 𝑣)
=𝑥 (Absorption law)
Chapter 4. Elementary Set Theory

Example 4.
Simplify 𝑥 × (𝑥 × 𝑦′)′.
Answer.
You must identify the law/axiom used in each step.
𝑥 × (𝑥 × 𝑦′)′ = 𝑥 × (𝑥 ′ + 𝑦′′)
= 𝑥 × (𝑥 ′ + 𝑦)
= (𝑥 × 𝑥 ′ ) + (𝑥 × 𝑦)
= 0 + (𝑥 × 𝑦)
=𝑥×𝑦

Example 5.
Simplify [(𝑥 × 𝑦) + (𝑥 ′ × 𝑧)] + (𝑦 × 𝑧 ′ ).
Answer.
You must identify the law/axiom used in each step.
[(𝑥 × 𝑦) + (𝑥 ′ × 𝑧)] + (𝑦 × 𝑧 ′ ) = [(𝑥 ′ × 𝑧) + (𝑥 × 𝑦)] + (𝑦 × 𝑧 ′ )
= (𝑥 ′ × 𝑧) + [(𝑥 × 𝑦) + (𝑦 × 𝑧 ′ )]
= (𝑥 ′ × 𝑧) + [(𝑦 × 𝑥) + (𝑦 × 𝑧 ′ )]
= (𝑥 ′ × 𝑧) + [𝑦 × (𝑥 + 𝑧 ′ )]
= [(𝑥 ′ × 𝑧) + 𝑦] × [(𝑥 ′ × 𝑧) + (𝑥 + 𝑧 ′ )]

= [(𝑥 ′ × 𝑧) + 𝑦] × [(𝑥
⏟ + 𝑧 ′ ) + (𝑥
⏟ + 𝑧 ′ )]
𝑤 𝑤

= [(𝑥 ′ ′
× 𝑧) + 𝑦] × [𝑤 + 𝑤]
= [(𝑥 ′ × 𝑧) + 𝑦] × 1
= (𝑥 ′ × 𝑧) + 𝑦

To simply the notation, we can drop the × symbol, so 𝑥 × 𝑦 can be written as just 𝑥𝑦. In this
notation, the brackets for the × operation may as well be dropped. Thus, for instance, for the
expression in Example 5, using simplified notations,
[(𝑥 × 𝑦) + (𝑥 ′ × 𝑧)] + (𝑦 × 𝑧 ′ ) = [𝑥𝑦 + 𝑥 ′ 𝑧] + 𝑦𝑧 ′ = 𝑥 ′ 𝑧 + 𝑦.
Chapter 4. Elementary Set Theory

Example 6.
Simplify (𝑥 + 𝑦 ′ )(𝑥 + 𝑦)
Answer.
You must identify the law/axiom used in each step.
(𝑥 + 𝑦 ′ )(𝑥 + 𝑦) = 𝑥 + 𝑦′𝑦
= 𝑥 + 𝑦𝑦′
=𝑥+ 0
=𝑥

Example 7.
Simplify 𝑦(𝑥 + 𝑥 ′ 𝑦)
Answer.
You must identify the law/axiom used in each step.
𝑦(𝑥 + 𝑥 ′ 𝑦) = 𝑦𝑥 + 𝑦𝑥′𝑦
= 𝑦𝑥 + 𝑦𝑦𝑥′
= 𝑦𝑥 + 𝑦𝑥′
= 𝑦(𝑥 + 𝑥 ′ )
= 𝑦1
=𝑦

Exercise 5.6. Simplify the following Boolean expressions.


a. 𝑥 + 𝑥𝑦𝑧
b. 𝑦(𝑥 + 𝑦 + 𝑧)
c. (𝑥𝑦 ′ + 𝑥′)′
d. (𝑥 ′ + 𝑥′)′
e. (𝑥 + 𝑦𝑧)(𝑥 ′ + 𝑧)
f. (𝑥𝑦)′ + 𝑦𝑧
g. 𝑧′(𝑥𝑦𝑧)′
h. (𝑥𝑦 ′ + 𝑥 ′ )′
i. 𝑥 ′ + 𝑦 ′ + 𝑥𝑦𝑧′
j. (𝑥𝑦)′(𝑥 ′ + 𝑥)(𝑥 + 𝑦 ′ )
Exercise 5.7. Rewrite the expressions in Exercise 5.6 as logical and set expressions.

5.2. Digital Circuits


One application of Boolean algebra is in the circuit design of digital computers. In the circuit,
the basic operations are based on passing signals to some elementary components, which will
then switch them on or off. A complex circuit design may consist of millions of those components
and internal circuits, each of which does a specific task. For instance, one circuit does just adding
Chapter 4. Elementary Set Theory

two numbers; taking numbers as input and giving a number as output. These components and
circuits can then be compactly etched in a microchip, for instance.

Because it is about “on” or “off”, the whole process in the circuit is modelled as a binary process
that involve values, which are represented by the symbols 0 (for “no signal”) and 1 (for “with
signal”). Necessary calculations in the process can be performed in the Boolean algebra.

For this purpose, the set 𝐵 in Definition 5.1. contains just the two elements 0 and 1; thus, 𝐵 =
{0,1}. Furthermore, the two operations + and × represent the OR and AND logical connective,
respectively. Finally, the complement ′ represents the NOT connective. In the design, each
operation is then represented by a logical gate.

Definition 5.2. Logical gate


(i) An inventer (NOT gate) is a logical gate that takes one input 𝑥 and gives one output 𝑥′.
In a circuit, an inventer is represented by the following symbol:

(ii) An AND gate is a logical gate that takes two inputs 𝑥 and 𝑦 and gives one output 𝑥𝑦.
In a circuit, an AND gate is represented by the following symbol:

(iii) An OR gate is a logical gate that takes two inputs 𝑥 and 𝑦 and gives one output 𝑥 + 𝑦.
In a circuit, an OR gate is represented by the following symbol:

For the NOT gate, it takes the input 𝑥, whose value is either 0 or 1. If 𝑥 = 0, then the output is
𝑥 ′ = 0′ = 1; if 𝑥 = 1, then the output is 𝑥 ′ = 1′ = 0. This input-output relation of the NOT gate
is summarized in the truth table in Table 2.
Table 2. The truth table for the NOT gate
𝑥 𝑥′
1 0
0 1

An AND gate takes two inputs: 𝑥 and 𝑦. Each input has value either 0 or 1. Suppose, 𝑥 = 0 and
𝑦 = 0. The AND gate then produces an output 𝑥𝑦 = 0 × 0 = 0 (Annihilation law). If 𝑥 = 1 and
𝑦 = 1, the AND gate produces an output 𝑥𝑦 = 1 × 1 = 1 (Identity axiom). Outputs for the other
possible combinations of inputs can be also be determined, using the axioms and laws. The
results are summarized in Table 3.
Table 3. The truth table for the AND gate
𝑥 𝑦 𝑥𝑦
1 1 1
1 0 0
0 1 0
0 0 0
Chapter 4. Elementary Set Theory

An OR gate takes two inputs: 𝑥 and 𝑦, each input either 0 or 1. Suppose, 𝑥 = 1 and 𝑦 = 0. The
output is 𝑥 + 𝑦 = 1 + 0 = 1 (Identity axiom). Outputs for the other possible combinations of
inputs can be also be determined, using the axioms and laws. The results are summarized in Table
4.
Table 4. The truth table for the OR gate
𝑥 𝑦 𝑥+𝑦
1 1 1
1 0 1
0 1 1
0 0 0

Suppose we want to design a circuit that does the process given by 𝑥𝑦′ + 𝑦. In this case, the
circuit takes two inputs 𝑥 and 𝑦, but the output has to be 𝑥𝑦′ + 𝑦. The circuit will consist of
more than one logical gate. The output for all possible combinations of inputs is presented in
Table 5.
Table 5. Output of 𝑥𝑦 ′ + 𝑦 for inputs 𝑥 and 𝑦
𝑥 𝑦 𝑦′ 𝑥𝑦 ′ 𝑥𝑦 ′ + 𝑦
1 1 0 0 1
1 0 1 1 1
0 1 0 0 1
0 0 1 0 0

To determine the final output (in the last column), we first determine 𝑦′, then 𝑥𝑦′, and finally
𝑥𝑦 ′ + 𝑦. This sequence can be used to design a circuit.

(1) Determine 𝑦′. Since 𝑦 is an input, we pass this input to a NOT gate to produce 𝑦′. This
is shown in the below figure.

(2) Determine 𝑥𝑦′. This is done by an AND gate, which takes to input 𝑥 and 𝑦′. In Step (1),
𝑦′ was obtained already from a NOT gate. So we pass this to an AND gate, together with
𝑥 to produce 𝑥𝑦′. The circuit up to this stage looks like this.

(3) Determine 𝑥𝑦 ′ + 𝑦. This is done by an OR gate, which takes to input 𝑥𝑦′ and 𝑦. 𝑥𝑦′ is
the output of the AND gate in Step (2). 𝑦 is an input, so we need to branch out this input
(the solid circle indicates a branching). We pass 𝑥𝑦′ and 𝑦 to an OR gate to get 𝑥𝑦 ′ + 𝑦.
This results in the desired circuit, depicted below.
Chapter 4. Elementary Set Theory

Example 8.
Design a circuit that represents the Boolean expression 𝑦(𝑥 + 𝑦 + 𝑧 ′ )
Answer.
Step (1): 𝑧′, done by passing 𝑧 to a NOT gate.

Step (2): 𝑦 + 𝑧′, done by passing 𝑦 and 𝑧′ to an OR gate.

Step (3): 𝑥 + 𝑦 + 𝑧′, done by passing 𝑥 and (𝑦 + 𝑧 ′ ) to an OR gate.

Step (4): 𝑦(𝑥 + 𝑦 + 𝑧 ′ ), done by passing 𝑦 and (𝑥 + 𝑦 + 𝑧 ′ ) to an AND gate.

Notice that the 𝑥 and 𝑦 path cross at a point. By convention, nothing happens at the crossing.

Exercise 5.8. Design a circuit that performs the following process and find the outputs for all
possible combinations of inputs.
a. (𝑥𝑦 ′ + 𝑥′)′
b. 𝑦(𝑥 + (𝑦𝑧)′)
c. (𝑥 + 𝑦𝑧)(𝑥 ′ + 𝑧)
d. (𝑥𝑦)′ + 𝑦𝑧
Chapter 4. Elementary Set Theory

Example 8.
Derive a Boolean expression that is represented by the following circuit and determine the
output values for all possible combinations of inputs.

Answer.
To construct a Boolean expression, we break down the circuit, starting from logical gates next
to the inputs (in the red box). In this circuit, it is an OR gate. This OR gate takes 𝑥 and 𝑦 and
yields 𝑥 + 𝑦.

Continuing with the next, middle gates (inside the red box), the OR gate takes 𝑥 + 𝑦 and
gives (𝑥 + 𝑦)′. The AND gate takes two inputs: 𝑦 and 𝑥 + 𝑦, and gives output 𝑦(𝑥 + 𝑦).

Finally, the last logical gate is an AND gate (in the red box), taking two inputs: (𝑥 + 𝑦)′ and
𝑦(𝑥 + 𝑦), and giving the output (𝑥 + 𝑦)′𝑦(𝑥 + 𝑦).

The output of this circuit for all combinations of inputs 𝑥 and 𝑦 are given in Table 6.
Table 6.
𝑥 𝑦 𝑥+𝑦 (𝑥 + 𝑦)′ 𝑦(𝑥 + 𝑦) (𝑥 + 𝑦)′𝑦(𝑥 + 𝑦)
1 1 1 0 1 0
1 0 1 0 0 0
0 1 1 0 1 0
0 0 0 1 0 0
Chapter 4. Elementary Set Theory

Exercise 5.9. For the following circuits, find a Boolean expression and determine all possible
outputs.
a.

b.

c.

d.

5.3. Sum of products and product of sums


In Section 5.2. we discussed two types of problems:
• Given a Boolean expression, we design a digital circuit which performs it.
• Given a digital circuit, we derive a Boolean expression it performs.
Since in both cases, the Boolean expression is (in the end) known, we can analyze the outputs by
constructing the truth table.
Now, suppose we expect certain types of outputs. What is the Boolean expression which
produces such outputs? This is a typical design problem. Once you can find the Boolean
Chapter 4. Elementary Set Theory

expression, you will be able to design the circuit. Unfortunately, there are many possible Boolean
expression that produces outputs that you want.
Consider the design of circuits that require 2 inputs: 𝑥 and 𝑦. You expect an output that looks
like in the grey column of the following truth table. What is the expression 𝑓 that results in such
a truth table?
𝑥 𝑦 𝑓
1 1 1
1 0 0
0 1 0
0 0 0

You can quickly answer: 𝑓 = 𝑥𝑦, because the above table is the same as the truth table of the
AND gate. But, 𝑓 = 𝑥(𝑥𝑦 ′ )′ also produces the same truth table. In fact, in Example 4 we showed
that 𝑥(𝑥𝑦 ′ )′ = 𝑥𝑦. The two expressions lead to different digital circuits.
For circuits that take many inputs, construction of a Boolean expression from a truth table
(expected outputs) is not as straightforward as in the above example, and there will be many
more possible Boolean expressions. There are however methods we can use to derive some of
these possible Boolean expressions.
5.3.1. Sum of products
In the sum-of-products method, we derive a Boolean expression that is a sum-of-products form.
The method is summarized as follows:
• Consider only rows with expected outputs equal to 1 in the 𝑓 column (last column); ignore
rows with outputs 0.
• For every row with expected output value equal to 1, we construct a product that involves
the input variables 𝑥, 𝑦, 𝑧, … in the following way:
o If 𝑥 = 1, then we use 𝑥 in the product; if 𝑥 = 0, then we use 𝑥′ in the product
o If 𝑦 = 1, then we use 𝑦 in the product; if 𝑦 = 0, then we use 𝑦′ in the product
o If 𝑧 = 1, then we use 𝑧 in the product; if 𝑧 = 0, then we use 𝑧′ in the product
o And so of there are some other inputs variables
• Sum all products to form the Boolean expression 𝑓
Chapter 4. Elementary Set Theory

Example 9.
Find a Boolean expression that results in the following truth table, in the sum-of-products
form.
𝑥 𝑦 𝑓
1 1 1
1 0 0
0 1 0
0 0 0

Answer.
There is only one output value equal to 1 in the 𝑓 column. So, we will construct a product of
the inputs 𝑥 and 𝑦 for this row only (the other rows, with the output value equal to 0, are
ignored). Along this row, 𝑥 = 1, so we use 𝑥 in the product. Also, 𝑦 = 1, so we use 𝑦 in the
product. The product then reads 𝑥𝑦, which is the only product. Summing up the product
column, we get 𝑓 = 𝑥𝑦.
𝑥 𝑦 𝑓 Product
1 1 1 𝑥𝑦
1 0 0 -
0 1 0 -
0 0 0 -
𝑓 = 𝑥𝑦

Example 10.
Find a Boolean expression that results in the following truth table, in the sum-of-products
form.
𝑥 𝑦 𝑓
1 1 1
1 0 0
0 1 1
0 0 0

Answer.
There are two output value equal to 1 in the 𝑓 column. So, we will construct a product of the
inputs 𝑥 and 𝑦 for these rows only. For the 1st row, 𝑥 = 1, so we use 𝑥 in the product. Also,
𝑦 = 1, so we use 𝑦 in the product. The product then reads 𝑥𝑦. For the 3rd row, 𝑥 = 0, so we
use 𝑥′ in the product. Furthermore, 𝑦 = 1, so we use 𝑦 in the product. The product reads 𝑥′𝑦.
Summing up the product column, we get 𝑓 = 𝑥𝑦 + 𝑥′𝑦.
𝑥 𝑦 𝑓 Product
1 1 1 𝑥𝑦
1 0 0 -
0 1 1 𝑥′𝑦
0 0 0 -
𝑓 = 𝑥𝑦 + 𝑥 ′ 𝑦
Chapter 4. Elementary Set Theory

5.3.2. Product of sums


In the product-of-sums method, we derive a Boolean expression in a product-of-sums form.
The method is summarized as follows:
• Consider only rows with expected outputs equal to 0 in the 𝑓 column (last column); ignore
rows with outputs 1.
• For every row with expected output value equal to 0, we construct a product that involves
the input variables 𝑥, 𝑦, 𝑧, … in the following way:
o If 𝑥 = 1, then we use 𝑥′ in the product; if 𝑥 = 0, then we use 𝑥 in the product
o If 𝑦 = 1, then we use 𝑦′ in the product; if 𝑦 = 0, then we use 𝑦 in the product
o If 𝑧 = 1, then we use 𝑧′ in the product; if 𝑧 = 0, then we use 𝑧 in the product
o And so of there are some other inputs variables
• Multiply all sums to form the Boolean expression 𝑓

Example 11.
Find a Boolean expression that results in the following truth table, in the product-of-sums
form.
𝑥 𝑦 𝑓
1 1 1
1 0 0
0 1 0
0 0 0

Answer.
There are three output values equal to 0 in the 𝑓 column, in the 2nd, 3rd, and 4th row. So, we
will construct sums of the inputs 𝑥 and 𝑦 for these rows. In the 2nd row, 𝑥 = 1, so we use 𝑥′
in the sum; 𝑦 = 0, so we use 𝑦 in the sum. The sum in the 2nd row reads 𝑥 ′ + 𝑦.
In the 3rd row, 𝑥 = 0, so we use 𝑥; 𝑦 = 1, so we use 𝑦′ in the sum. This leads to the sum 𝑥 +
𝑦′. Finally, for the 4th row, 𝑥 = 0 and 𝑦 = 0, so we use 𝑥 and 𝑦 to have the sum 𝑥 + 𝑦.
Multiplying all the sums results in the expression 𝑓 = (𝑥 ′ + 𝑦)(𝑥 + 𝑦 ′ )(𝑥 + 𝑦).

𝑥 𝑦 𝑓 Sum
1 1 1 -
1 0 0 𝑥′ + 𝑦
0 1 0 𝑥 + 𝑦′
0 0 0 𝑥+𝑦
𝑓 = (𝑥 ′ + 𝑦)(𝑥 + 𝑦 ′ )(𝑥 + 𝑦)
Chapter 4. Elementary Set Theory

Example 12.
Find a Boolean expression that results in the following truth table, in the product-of-sums
form.
𝑥 𝑦 𝑓
1 1 1
1 0 0
0 1 1
0 0 0

Answer.
There are two output value equal to 0 in the 𝑓 column, the 2nd and the 4th row. So, we will
construct a sum of the inputs 𝑥 and 𝑦 for these rows only. For the 2nd row, 𝑥 = 1, so we use
𝑥′ in the sum; 𝑦 = 0, so we use 𝑦 in the product. The sum then reads 𝑥 ′ + 𝑦. For the 4th row,
𝑥 = 0, so we use 𝑥; Furthermore, 𝑦 = 0, so we use 𝑦. The sum reads 𝑥 + 𝑦. Multiplying the
sums, we get 𝑓 = (𝑥 ′ + 𝑦)(𝑥 + 𝑦).
𝑥 𝑦 𝑓 Sum
1 1 1 -

1 0 0 𝑥 +𝑦
0 1 1 -
0 0 0 𝑥+𝑦
𝑓 = (𝑥 ′ + 𝑦)(𝑥 + 𝑦)
Chapter 4. Elementary Set Theory

Example 13.
Find a Boolean expression that results in the following truth table, in the sum-of-products and
the product-of-sums form. Sketch the corresponding digital circuit.
𝑥 𝑦 𝑓
1 1 0
1 0 1
0 1 1
0 0 0

Answer.
Applying the methods results in the following table.
𝑥 𝑦 𝑓 Product Sum
1 1 0 - 𝑥 ′ + 𝑦′
1 0 1 𝑥𝑦′ -
0 1 1 𝑥′𝑦 -
0 0 0 - 𝑥+𝑦
𝑓 = 𝑥𝑦 ′ + 𝑥′𝑦 𝑓 = (𝑥 ′ + 𝑦 ′ )(𝑥 + 𝑦)

The circuit for each expression is shown below.

Exercise 5.10. Verify using the axioms and laws of Boolean algebra that the two Boolean
expressions in Example 13 are equal.
Chapter 4. Elementary Set Theory

Example 14.
Find a Boolean expression that results in the following truth table, in the sum-of-products and
the product-of-sums form.
𝑥 𝑦 𝑧 𝑓
1 1 1 0
1 1 0 0
1 0 1 1
1 0 0 0
0 1 1 1
0 1 0 0
0 0 1 1
0 0 0 1

Answer.

𝑥 𝑦 𝑧 𝑓 Product Sum
1 1 1 0 - 𝑥 + 𝑦 ′ + 𝑧′

1 1 0 0 - 𝑥′ + 𝑦′ + 𝑧
1 0 1 1 𝑥𝑦′𝑧 -

1 0 0 0 - 𝑥 +𝑦+𝑧
0 1 1 1 𝑥′𝑦𝑧 -
0 1 0 0 - 𝑥 + 𝑦′ + 𝑧
0 0 1 1 𝑥′𝑦′𝑧 -
0 0 0 1 𝑥′𝑦′𝑧′ -

Summing up the product column results in


𝑓 = 𝑥𝑦 ′ 𝑧 + 𝑥 ′ 𝑦𝑧 + 𝑥 ′ 𝑦 ′ 𝑧 + 𝑥 ′ 𝑦 ′ 𝑧 ′ .
Multiplying the sum column gives
𝑓 = (𝑥 ′ + 𝑦 ′ + 𝑧 ′ )(𝑥 ′ + 𝑦 ′ + 𝑧)(𝑥 ′ + 𝑦 + 𝑧)(𝑥 + 𝑦 ′ + 𝑧).
The two expressions above can be verified to be equal.
Chapter 4. Elementary Set Theory

Exercise 5.11. Find a Boolean expression that results in the following truth table, in the sum-
of-products and the product-of-sums form. Sketch the corresponding circuit.
a.
𝑥 𝑦 𝑓
1 1 0
1 0 1
0 1 0
0 0 0
b.
𝑥 𝑦 𝑓
1 1 0
1 0 1
0 1 1
0 0 1

Exercise 5.12. Find a Boolean expression that results in the following truth table, in the sum-
of-products and the product-of-sums form.
a.
𝑥 𝑦 𝑧 𝑓
1 1 1 1
1 1 0 0
1 0 1 0
1 0 0 0
0 1 1 1
0 1 0 1
0 0 1 1
0 0 0 0

b.
𝑥 𝑦 𝑧 𝑓
1 1 1 0
1 1 0 1
1 0 1 1
1 0 0 0
0 1 1 0
0 1 0 1
0 0 1 1
0 0 0 0

You might also like