(A+B+C)(A+B+C`)(A`+B+C)(A`+B+C`)

Topic 3 – Boolean Algebra
and Switching Functions
Boolean Algebra


A Boolean algebra is defined as a closed
algebraic system containing a set K or
two or more elements and the two
operators, . and +.
For every a and b in the set K, a.b
belongs to K and a+b belongs to K. . is
defined as AND and + is defined as OR.
Identity Elements

There exist unique elements 1 (one)
and 0 (zero) in set K such that for every
a in K…



a+0=a
a.1=a
Therefore, we can see that 0 is the
identity element for the + operation
and 1 is the identity element for the .
operation.
Commutativity and
Associativity of the Operators

The Commutative Property:
For every a and b in K,



a+b=b+a
a.b=b.a
The Associative Property:
For every a, b, and c in K,


a + (b + c) = (a + b) + c
a . (b . c) = (a . b) . c
Distributivity of the Operators
and Complements

The Distributive Property:
For every a, b, and c in K,



a+(b.c)=(a+b).(a+c)
a.(b+c)=(a.b)+(a.c)
The Existence of the Complement:
For every a in K there exists a unique
element called a’ (complement of a) such
that,


a + a’ = 1
a . a’ = 0
Alternate Notation for AND

To simplify notation, the . operator is
frequently omitted. When two
elements are written next to each other,
the AND (.) operator is implied…


a+b.c=(a+b).(a+c)
a + bc = ( a + b )( a + c )
Venn Diagrams

In order to see these concepts more
visually, consider Venn Diagrams.
a
This is set a.
b
a
This is set b.
b
Venn Diagrams

To see the operators…
a
This is set a+b.
b
a
This is set ab.
b
Properties of the Complement

Let’s look at some consequences of the
existence of the complement of a, a’…



If a is the shaded oval to the left, a’ is all
of the area outside that shaded region.
Since a and a’ have no area in common,
aa’ = 0. Also, since a’ contains all the area
a does not, a+a’=1.
Since the universal set is 1, it complement
must be the null set, 0. Therefore, 1’ = 0
and 0’ = 1.
Properties of the Complement
a
Universal set, 1
Null set, 0
Set a
Set aa’
Set a + a’
a
Set a’
Duality


The principle of duality is an important
concept. This says that if an expression
is valid in Boolean algebra, the dual of
that expression is also valid.
To form the dual of an expression,
replace all + operators with . operators,
all . operators with + operators, all ones
with zeros, and all zeros with ones.
Duality

Let’s illustrate this by forming the dual of the
expression
a + (bc) = (a + b)(a + c)

Following the replacement rules…
a(b + c) = ab + ac

When forming the dual of an expression, take
care not to alter the location of the
parentheses if they are present. To do so
would make the resulting dual expression not
valid.
Fundamental Theorems


There are a number of useful theorems
that are present in Boolean algebra
which can help to simplify expressions.
We will look at a number of these
theorems and prove some of them.
The proof of the rest of the theorems
will not be proven but their proofs
follows directly from the other proofs.
Theorem 1 : Idempotency


This theorem states:
a+a=a
a.a=a
To prove the first half of this theorem:
a+a
= (a + a)1
= (a + a) (a + a’)
= a + aa’
=a+0
a+a
=a
Theorem 2 : Null Elements


This theorem states:
a+1=1
a.0=0
To prove the first half of this theorem:
a+1
= (a + 1)1
= (a + 1) (a + a’)
= aa + a + aa’ + a’1
= a + a + 0 + a’
= a + a’
a+1
=1
Theorem 3 : Involution


This theorem states:
a’’ = a
To prove this theorem, first remember
that aa’ = 0 and a+a’=1. Therefore, a’
is the complement of a and a is also the
complement of a’. As the complement
of a’ is unique, it follows that a’’=a.
Theorem 4 : Absorption


This theorem states:
a + ab = a
a(a+b) = a
To prove the first half of this theorem:
a + ab
= a . 1 + ab
= a (1 + b)
= a (b + 1)
= a (1)
a + ab
=a
Properties of 0 and 1 Elements

To summarize 0 and 1 elements…
OR
AND
COMPLEMENT
a+0=a
a.0=0
0’ = 1
a+1=1
a.1=1
1’ = 0
Exercise

Simply the following expressions:

(X + Y) + (X + Y)Z

AB’(AB’ + B’C)

AB’C + B’
X+Y
AB’
B’
Theorem 5


This theorem states:
a + a’b = a + b
a(a’+b) = ab
To prove the first half of this theorem:
a + a’b
= (a + a’)(a + b)
= 1 . (a + b)
a + a’b
= (a + b)
Exercise

Simply the following expressions:

B + AB’C’D

Y’(X + Y + Z)

(X + Y)((X + Y)’ + Z)

AB + (AB)’CD’
B + AC’D
Y(X + Z)
(X + Y)Z
AB + CD’
Theorem 6


This theorem states:
ab + ab’ = a
(a + b)(a+b’) = a
To prove the first half of this theorem:
ab + ab’ = a(b + b’)
= a(1)
ab + ab’ = a
Exercise

Simply the following expressions:

ABC + AB’C

(AD + B + C)(AD + (B + C)’)

(W’+X’+Y’+Z’)(W’+X’+Y’+Z)
(W’+X’+Y+Z’)(W’+X’+Y+Z)
AC
AD
(W’ + X’)
Theorem 7


This theorem states:
ab + ab’c = ab+ac
(a + b)(a+b’+c) = (a+b)(a+c)
To prove the first half of this theorem:
ab + ab’c = a(b + b’c)
= a(b+c)
ab + ab’c = ab + ac
Theorem 7 Example

We can see this theorem in action…
wy’ + wx’y + wxyz + wxz’
wy’ + wx’y + wxy + wxz’
wy’ + wy + wxz’
w + wxz’
w

And again…
(A’ + B’ + C’)(B’ + C) (A + B’)
(A’ + B’)(B’ + C)(A + B’)
B’(B’ + C)
B’
Theorem 8 :
DeMorgan’s Theorem

A key theorem in simplifying Boolean
algebra expression is DeMorgan’s
Theorem. It states:
(a + b)’ = a’b’
(ab)’ = a’ + b’
Example of
DeMorgan’s Theorem

Complement the expression
a(b + z(x + a’)) and simplify.
(a(b+z(x + a’)))’
= a’ + (b + z(x + a’))’
= a’ + b’(z(x + a’))’
= a’ + b’(z’ + (x + a’)’)
= a’ + b’(z’ + x’a’’)
= a’ + b’(z’ + x’a)
= a’ + b’(z’ + x’)
Theorem 9 : Consensus


This theorem states:
ab + a’c + bc = ab+a’c
(a + b)(a’+c)(b + c) = (a+b)(a’+c)
To prove the first half of this theorem:
ab+a’c+bc = ab + a’c + 1(bc)
= ab + a’c + (a+a’)(bc)
= ab + a’c + abc + a’bc
= (ab + abc) + (a’c + a’cb)
ab+a’c+bc = ab + a’c
Exercise

Simply the following expressions:

AB + A’CD + BCD

(a+b’)(a’+c)(b’+c)

ABC + A’D + B’D + CD
AB + A’CD
(a+b’)(a’+c)
ABC + A’D + B’D
Introduction to
Switching Functions



From now on, we will only consider
Boolean algebras where K={0,1}, i.e.
only 1 and 0 elements exist. This is
known as switching algebra.
The concept of a function should
already be well known, from the field of
traditional algebra.
We let X1, X2, …, Xn be symbols known
as variables where they can each
represent a value of 0 or 1.
Introduction to
Switching Functions



A function f(X1, X2, … Xn) represents a
switching function of X1, X2, … Xn.
This function f() represents the value 0 or 1,
based on the set of values assigned to X1, X2,
… Xn.
There are n variables and each variable has
two possible values. Thus, there are 2n ways
of assigning these values to n variables.
There are also 2 possible values
for such a
n
function. Thus, there are 22 different
switching functions of n variables.
Basic Switching Functions


For the case where n=0, there are two
switching functions of zero variables:
f0 = 1
f1 = 1
For n=1, there are four switching
functions of one variable, A:
f0 = 0
f2 = A
f1 = A’
f3 = 1
Switching Expressions


A switching function is typically described by
a switching expression, such as (in 3
variables):
f(A, B, C) = AB + A’C + AC’
This switching function is dependent on three
variables. If A=1, B=0, C=0, we can see that
f(A,B,C)=1. If A=0, B=1, C=0, we can see
that f(A,B,C)=0. This can be done for all
possible combinations of A, B, and C.
Truth Tables


If we evaluate a switching function for all
possible input combinations, and then list the
results in tabular forms, we obtain a powerful
representation of the function, known as a truth
table.
We can derive truth tables for AND, OR…
AB
f(A,B) = A + B
AB
f(A,B) = AB
00
0
00
0
01
1
01
0
10
1
10
0
11
1
11
1
Truth Tables Exercise

Let’s form truth table for the complement
f0(A) = A’ and f1(A, B, C) = AB + A’C + AC’
ABC
f1(A,B,C) = AB + A’C + AC’ 0 0 0
f0(A) = A’
A
f0(A)
0
1
1
0
f1(A,B,C)
0
001
1
010
0
011
1
100
1
101
0
110
1
111
1
The SOP Form


The sum-of-products (SOP) form is a
switching function constructed by summing
(ORing) product (ANDed) terms. Each
product term is formed by ANDing a number
of variables (either complemented or
uncomplemented), each known as a literal.
An example SOP form of a function of four
variables is:
f(A, B, C, D) = AB’C + C’D’ + A’C’D
The POS Form


The product-of-sums (POS) form is a
switching function constructed by taking the
product of ANDing) sum (ORed) terms. Each
sum term is formed by ORing a number of
variables (either complemented or
uncomplemented), each known as a literal.
An example POS form of a function of four
variables is:
f(A, B, C, D) = (A’+B+C)(B’+C+D’)(A+C’+D)
Canonical Forms



Canonical forms for switching functions are
SOP or POS forms with special characteristics.
For a function of n variables, if a product
term contains each of the n variables exactly
one time in either complemented or
uncomplemented form, that product term is
called a minterm.
If the function is represented as a sum of
minterms only, the function is said to be in
canonical sum of products (or canonical SOP)
form.
Canonical SOP Form

As an example,
fk(A,B,C) = A’BC’ + ABC’ + A’BC + ABC

is the canonical SOP form of function
f(A, B, C, D) which has four minterms.
To simplify writing the canonical SOP
form, a special notation is frequently
used in which each minterm is
represented using an n-bit binary code.
Canonical SOP Form




In this form, each bit represents one of the
variables of the minterm with 1 representing
the uncomplemented variable and 0
representing the complemented variable.
The variables are listed in the same order in
each minterm.
When this form is used, for a minterm to
evaluate to 1, each uncomplemented variable
must evaluate to 1 and each complemented
variable must evaluate to 0.
For example…
Minterm Representations


The minterms of fk(A,B,C) may be written in any
of these forms…
Minterm
Minterm Code Midterm
Number
A’BC’
010
m2
ABC’
110
m6
A’BC
011
m3
ABC
111
m7
Here, each minterm is written as an abbreviated
form as mi, where i is the integer equal to the
corresponding binary code for that minterm.
Minterm Representations



Therefore, we can rewrite fk(A,B,C) in a more
compact form as…
fk(A,B,C) = m2 + m3 + m6 + m7
Even more simply, we can write this function
in minterm list form as…
fk(A,B,C) = Σ m(2,3,6,7)
These two forms are equivalent to the
original minterm expression…
fk(A,B,C) = A’BC’ + ABC’ + A’BC + ABC
Minterm Representations

From the minterm
list form
fk(A,B,C) =
Σ m(2,3,6,7)
we can recover the
truth table for the
function…
Row #
Inputs
Output
0
000
0
1
001
0
2
010
1
3
011
1
4
100
0
5
101
0
6
110
1
7
111
1
Example

As an example, let’s take the function
f(A,B,C,D) = A’B’C’D’+A’B’C’D+A’BCD’+A’BCD

and express the function f(A,B,C,D) and its
complement f’(A,B,C,D) in minterm list form…
f(A,B,C,D) = Σ m(0,1,6,7)
As f(A,B,C,D) contains four minterms (of the
possible 16), f’(A,B,C,D) must contain the
remaining 12 minterms. Therefore…
f’(A,B,C,D) =
Σ m(2,3,4,5,8,9,10,11,12,13,14,15)
Canonical POS Forms


If a sum term of a function of n variables
contains each of the n variables exactly one
time, either in complemented or
uncomplemented form, the sum term is called
a maxterm.
If a function is represented as a product of
sum terms, each of which is a maxterm, the
function is said to be in canonical product of
sums (canonical POS) form.
Canonical POS Form

As an example,
fj(A,B,C) = (A+B+C)(A+B+C’)(A’+B+C)(A’+B+C’)

is the canonical POS form of function fj(A, B,
C, D) which has four maxterms.
To simplify writing the canonical POS form, a
special notation is frequently used in which
each minterm is represented using an n-bit
binary code.
Canonical POS Form




In this form, each bit represents one of the
variables of the maxterm with 0 representing
the uncomplemented variable and 1
representing the complemented variable.
The variables are listed in the same order in
each minterm.
When this form is used, for a maxterm to
evaluate to 0, each uncomplemented variable
must evaluate to 0 and each complemented
variable must evaluate to 1.
For example…
Maxterm Representations


The maxterms of fj(A,B,C) may be written in any
of these forms…
Maxterm
Maxterm
Code
Maxterm
Number
A+B+C
000
M0
A + B + C’
001
M1
A’ + B + C
100
M4
A’ + B + C’
101
M5
Here, each maxterm is written as an abbreviated
form as Mi, where i is the integer equal to the
corresponding binary code for that maxterm.
Maxterm Representations



Therefore, we can rewrite fj(A,B,C) in a more
compact form as…
fj(A,B,C) = M0 + M1 + M4 + M5
Even more simply, we can write this function
in maxterm list form as…
fj(A,B,C) =  M(0,1,4,5)
These two forms are equivalent to the
original minterm expression…
fj(A,B,C) =
(A+B+C)(A+B+C’)(A’+B+C)(A’+B+C’)
Maxterm Representations

From the maxterm
list form
fj(A,B,C) =
Σ M(0,1,4,5)
we can recover the
truth table for the
function…
Row #
Inputs
Output
0
000
0
1
001
0
2
010
1
3
011
1
4
100
0
5
101
0
6
110
1
7
111
1
Minterms and Maxterms



A specific relationship between minterm mi
and maxterm Mi exists. We can see this by
taking the complement of m1…
m1 = A’B’C
m1’ = (A’B’C)’
m1’ = A + B + C’ = M1
This relationship is true in general, mi’=Mi
and Mi’=mi’’=mi.
Therefore, minterms and maxterms are
complements of each other.
Canonical Form Derivation



It should be clear how canonical POS and
SOP forms of a function can be translated
directly to truth tables.
However, when a function is expressed in a
noncanonical form, it is often useful to
convert it to canonical SOP or POS form using
switching algebra without first deriving the
truth table.
This is performed using Shannon’s expansion
theorem.
Shannon’s Expansion Theorem

Shannon’s expansion theorem states:
f(x1,x2,…,xn) = x1f(1,x2,..xn)+x1’f(0,x2,…xn)
f(x1,x2…xn) =
(x1+f(0,x2,…xn))(x1’+f(1,x2,…xn))

In order to see how this theorem
works, let’s work through a couple of
examples…
Canonical Form Example #1

AB
AC’
A’C
Convert the function to canonical SOP form…
f(A,B,C) = AB + AC’ + A’C
= ABC’ + ABC = m6 + m7
= ABC’ + AB’C’ = m6 + m4
= A’BC + A’B’C = m3 + m1
Therefore,
f(A,B,C)
= AB + AC’ + A’C
= (m6 + m7) + (m6 + m4) + (m3 + m1)
= Σ m(1,3,4,6,7)
Canonical Form Example #2

Convert the function to canonical POS form…
f(A,B,C) = A(A + C’)
= (A + B’)(A + B)
= (A + B’ + C)(A + B’ + C)(A + B + C)(A + B + C’)
= M3 M2 M 1 M0
A + C’ = (A + B + C’)(A + B’ + C’)
= M3 M1
A
Therefore,
f(A,B,C)
= (M3M2M1M0)(M3M1)
=  M(0, 1, 2, 3)
Incompletely
Specified Functions



Sometimes, we encounter cases in which the
switching function is not completely specified.
This means that the function may be required
to contain certain minterms and omit others,
with the remaining minterms optional.
A minterm that is optional is called a don’t
care minterm.
If a function is expressed in terms of its
maxterms, the don’t care minterms are
expressed as the corresponding maxterms, in
which they are called don’t care maxterms.
Don’t Care Minterms



There are two ways to encounter don’t care
cases.
First, certain input combinations may never
be applied to a particular switching network.
For example, suppose a network has four
inputs, a3a2a1a0, where the input is BCD
digits. Only 10 minterms, m0..m9 can occur.
The remaining minterms m10..m15 cannot
occur and thus are don’t care minterms.
Consequently, they can be either included or
omitted as desired in switching expressions.
Don’t Care Minterms



When we write don’t care minterms, we will
do so with the syntax di as opposed to mi.
This indicates that they may be either
included or omitted form the switching
function.
Don’t care conditions can also arise when all
input combinations can occur, but the output
is required to be 0 or 1 only for certain
combinations.
Let’s see how this can be useful.
Applying Don’t Care Cases


A switching function has minterms m0, m3,
and m7, and don’t care conditions d4 and d5.
Let’s express this function and its
complement in minterm form.
f(A,B,C)=Σ m(0,3,7) + d(4,5)
f(A,B,C)= M(1,2,6) + D(4,5)
Note that the don’t care maxterms Di are
simply the don’t care minterms since they
may be either 0 or 1 (as they’re don’t cares).
Applying Don’t Care Cases

To simply this expression, let’s list the terms…
f(A,B,C)=A’B’C’+A’BC+ABC+d(AB’C’+AB’C)

Notice that the second and third terms differ
only in a single literal so we an combine
them…
f(A,B,C)=A’B’C’+BC+d(AB’C’+AB’C)

We can’t simplify further without the don’t
cares. Let’s use d4 and omit d5…
f(A,B,C)=A’B’C’+BC+AB’C’
f(A,B,C)=B’C’ + BC