Boolean Algebra: N 1 2 N I N
Boolean Algebra: N 1 2 N I N
Boolean Algebra: N 1 2 N I N
Boolean Algebra
1. Boolean Functions
Discussion
x y F (x, y)
1 1 1
1 0 0
0 1 0
0 0 0
115
1. BOOLEAN FUNCTIONS 116
Discussion
There are several ways we may define a Boolean function. A table of values is one
way. After we define addition, multiplication, and other operations on B, we may
also use these operations to define functions.
Notice a Boolean function of two variables must assign to each of the four ordered
pairs a value from B. This means there are 24 = 16 different Boolean functions of
order 2.
Exercise 1.2.1. Use a table of values to define all 16 Boolean functions of order
2.
Exercise 1.2.2. How many Boolean functions of degree n are there?
Discussion
If you think of the 1 as “true” and the 0 as “false”, as we used in Logic, you should
notice that Boolean addition corresponds to the logical “or”, Boolean multiplication
corresponds to the logical “and”, and complementation corresponds to the logical
“not”. In fact, many authors use the notation ∨, ∧, and ¬ for +, ·, and , respec-
tively. The notation x = x0 is another common alternative for complimentation. We
1. BOOLEAN FUNCTIONS 117
will use this alternative on the discussion board and it may be used in homework.
When there would be no confusion, we drop the · when denoting a Boolean product,
just as is done is algebra.
Notice that Boolean addition defined here on {0, 1} is NOT the same as the
addition on the set of integers modulo 2.
(1) F (x, y) = x + y
(2) G(x, y) = xy + xy + xy
Proof. We show the two functions have the same values for every possible or-
dered pair in B 2 .
x y xy x y xy xy xy + xy + xy x + y
1 1 1 0 0 0 0 1 1
1 0 0 0 1 0 1 1 1
0 1 0 1 0 1 0 1 1
0 0 0 1 1 0 0 0 0
Discussion
Example 1.4.1 gives an example of equivalent functions that are defined quite
differently, although both representations are in terms of the algebra we have defined
on {0, 1}.
1.5. Boolean Identities. Below is a table of the Boolean Identities you should
know.
1. BOOLEAN FUNCTIONS 118
Identity Name
x=x Law of Double Complement
x + x = x and x · x = x Idempotent Laws
x + 0 = x and x · 1 = x Identity Laws
x + 1 = 1 and x · 0 = 0 Dominance Laws
x+y =y+x
Commutative Laws
xy = yx
x + (y + z) = (x + y) + z
Associative Laws
x(yz) = (xy)z
x + yz = (x + y)(x + z)
Distributive Laws
x(y + z) = xy + xz
x·y =x+y
DeMorgan’s Laws
x+y =x·y
Discussion
The distributive law for addition over multiplication and the DeMorgan’s Laws
may seem somewhat unusual to you at this stage, since they have no counterpart in
the operations of addition and multiplication used in our familiar number systems.
Indeed, you should avoid any analogies with ordinary arithmetic and, instead, use
the propositional calculus as your model whenever you feel the need to use a familiar
setting in which to exemplify these or any other properties you might encounter.
Exercise 1.5.1. Verify the distributive law x + yz = (x + y)(x + z).
1.6. Dual.
Definition 1.6.1. The dual of a Boolean expression is the expression one obtains
by interchanging addition and multiplication and interchanging 0’s and 1’s. The dual
of the function F is denoted F d .
Theorem 1.6.1 (Duality Principle). If F and G are Boolean functions such that
F = G, then F d = Gd .
Discussion
Notice that we have implicitly assumed an order of operations for a Boolean ex-
pression: unless grouping is present to indicate otherwise, complements are evaluated
first, then products, and then sums. This order conforms to the convention we estab-
lished earlier for the order of operations in the predicate calculus. As the example
above shows, you must be careful to preserve the correct order of operation when
taking the dual of an expression, using parentheses wherever necessary.