Boolean Algebra
◎ Part 1
1
Topics Covered in Part 1:
1 – What is Boolean Algebra ?
2 – Boolean Functions
3
What is Boolean Algebra?
• A minor generalization of propositional logic.
– In general, an algebra is any mathematical structure satisfying certain
standard algebraic axioms.
• Such as associative/commutative/transitive laws, etc.
– General theorems that are proved about an algebra then apply to any
structure satisfying these axioms.
• Boolean algebra just generalizes the rules of propositional logic to sets other
than { T, F }.
– Example: The set {0,1} of base-2 digits, or the set {VL, VH} of low and high
voltage levels in a circuit.
• We will see that this algebraic perspective lends itself to the design of digital
logic circuits.
4
Boolean Functions
Topics:
• Boolean complement, product, and sum.
• Boolean expressions and functions.
• Boolean algebra identities.
• Duality.
• Abstract definition of a Boolean algebra.
5
Complement, Product and Sum
• Correspond to logical NOT, AND, and OR.
• We will denote the two logic values as
0:≡F and 1:≡T, instead of False and True.
– Using numbers encourages algebraic thinking.
• New, more algebraic-looking notation for the most
common Boolean operators:
x : x x y : x y x y : x y
Precedence order→
6
Examples:
7
Boolean Functions
◎ Let B = {0, 1}, the set of Boolean values.
◎ Then Bn = {(x1, x2, . . . , xn) | xi ∈ B for 1 ≤ i ≤ n} is the set of all possible n-
tuples of 0s and 1s.
◎ The variable x is called a Boolean variable if it assumes values only
from B, i.e. if its only possible values are 0 and 1.
◎ A function from Bn to B (written as f:BnB) is called a Boolean
function of degree n
Example:
• The function 𝐹 𝑥, 𝑦 = 𝑥𝑦ത from the set of ordered pairs
of Boolean variables to the set {0, 1} is a Boolean
function of degree 2 with F(1, 1) = 0,
F(1, 0) = 1, F(0, 1) = 0, and F(0, 0) = 0.
8
Boolean Expressions
• Let x1, …, xn be n different Boolean variables.
– n may be as large as desired.
• A Boolean expression (recursive definition) is a string of one of the
following forms:
– Base cases: 0, 1, x1, …, or xn.
– Recursive cases: E1, (E1E2), or (E1+E2), where E1 and E2 are Boolean
expressions.
• A Boolean expression represents a Boolean function.
– Furthermore, every Boolean function (of a given degree) can be
represented by a Boolean expression.
9
Boolean Expressions
Example: Find the values of the Boolean
function represented by:
10
How many different Boolean functions of
degree n are there?
◎ From the product rule for counting, it
follows that there are 2𝑛 different n-
tuples of 0s and 1s.
◎ Because a Boolean function is an
assignment of 0 or 1 to each of these 2𝑛
different n-tuples, the product rule
𝑛
shows that there are 22 different
Boolean functions of degree n.
11
Degree Boolean Functions
◎ A Boolean function of degree two is a function from a set with
four elements, namely, pairs of elements from
B = {0, 1}, to B, a set with two elements.
◎ Hence, there are 16 different Boolean functions of degree two.
See the following table.
12
Boolean equivalents and
operations on Boolean expressions
• Two Boolean expressions e1 and e2 that represent the exact same
function f are called equivalent.
– For instance, the Boolean expressions xy, xy + 0, and
xy · 1 are equivalent.
• We write e1 e2, or just e1 = e2.
– Implicitly, the two expressions have the same value for all values
of the free variables appearing in e1 and e2.
• The operators ¯, ·, and + can be extended from operating on
expressions to operating on the functions that they represent, in the
obvious way.
13
Identities of Boolean Algebra
◎ There are many identities in Boolean algebra. The
most important are given .
◎ These identities are particularly useful in simplifying
the design of circuits.
◎ Each of these can be proved using a table.
◎ All are special cases of the same set of identities in a
more abstract structure.
◎ Each collection of identities can be obtained by
making the appropriate translations.
○ For example, we can transform each of the identities
in the table into a logical equivalence by changing
each Boolean variable into a propositional variable,
each 0 into a F, each 1 into a T, each Boolean sum into
a disjunction, each Boolean product into a conjunction,
and each complementation into a negation
14
Example:
Show that the distributive law x(y + z) = xy + xz is valid.
15
Example:
Proof of correctness by symbolic manipulation using
Boolean algebra simplification:
ത + 𝑐 = (𝑎 + 𝑐)(𝑏ത + 𝑐)
Prove that: 𝑎 𝑏
Solution:
R.H.S = 𝑎 + 𝑐 𝑏ത + 𝑐
= 𝑎𝑏ത + 𝑎𝑐 + 𝑐𝑏ത + 𝑐𝑐 Distributive law
= 𝑎𝑏ത + 𝑐𝑎 + 𝑐 𝑏ത + 𝑐 commutative + idempotent law
= 𝑎𝑏ത + 𝑐(𝑎 + 𝑏ത + 1) Distributive law
= 𝑎𝑏ത + 𝑐1 Domination law
= 𝑎𝑏ത + 𝑐 Identity law
=L.H.S
16
Duality
• The dual ed of a Boolean expression e representing function f is obtained
by exchanging + with ·, and 0 with 1 in e.
The function represented by ed is denoted f d.
• Duality principle: An identity between functions represented by Boolean
expressions remains valid when the duals of both sides of the identity are
taken. This result, called the duality principle, is useful for obtaining new
identities.
• If e1 e2 then e1d e2d.
Example: The equivalence x (x+y) = x
implies (and is implied by) x + xy = x.
• The Boolean identities (given in the table in slide 15) come in pairs. What is the
relationship between the identities in each pair?
17
Example
For the function 𝐹 𝑥, 𝑦, 𝑧 = (𝑥ҧ + 𝑦ത + 𝑧ҧ + 𝑥𝑦),
ത show that
𝐹 𝑑 𝑥, 𝑦, 𝑧 = 𝐹(𝑥,ҧ 𝑦,
ത 𝑧)ҧ where 𝐹 𝑑 denotes the dual of F.
Solution:
𝐹 𝑑 𝑥, 𝑦, 𝑧 = (𝑥ҧ + 𝑦ത + 𝑧ҧ + 𝑥 𝑦)
ത 𝑑 = 𝑥ҧ 𝑦ത 𝑧(𝑥
ҧ + 𝑦)
ത
ത 𝑧ҧ = (𝑥ҧ + 𝑦ത + 𝑧ҧ + 𝑥ҧ 𝑦)
𝐹 𝑥,ҧ 𝑦, ത direct substitution
= (𝑥 + 𝑦 + 𝑧 + 𝑥𝑦)
ҧ double complement law
= 𝑥ҧ 𝑦ത𝑧ҧ 𝑥 + 𝑦ത De Morgan law
= 𝐹 𝑑 𝑥, 𝑦, 𝑧
18