Logic Functions and Boolean Algebra
Logic Functions and Boolean Algebra
b
c v = b .c. p
p
Boolean Algebra
• In this section we will introduce the laws
of Boolean Algebra
• We will then see how it can be used to
design combinational logic circuits
• Combinational logic circuits do not have
an internal stored state, i.e., they have
no memory. Consequently the output is
solely a function of the current inputs.
• Later, we will study circuits having a
stored internal state, i.e., sequential
logic circuits.
Boolean Algebra
OR AND
a+0= a a.0 = 0
a+a =a a.a = a
a +1 = 1 a.1 = a
a + a =1 a.a = 0
• AND takes precedence over OR, e.g.,
a.b + c.d = (a.b) + (c.d )
Boolean Algebra
• Commutation
a+b =b+a
a.b = b.a
• Association
( a + b) + c = a + (b + c)
( a.b).c = a.(b.c)
• Distribution
a.(b + c + K) = (a.b) + (a.c) + K
a + (b.c. K) = (a + b).( a + c). K NEW
• Absorption
a + (a.c) = a NEW
a.( a + c) = a NEW
Boolean Algebra - Examples
Show
a.( a + b) = a.b
a.( a + b) = a.a + a.b = 0 + a.b = a.b
Show
a + (a .b) = a + b
a + (a .b) = (a + a ).( a + b) = 1.(a + b) = a + b
Boolean Algebra
• A useful technique is to expand each
term until it includes one instance of each
variable (or its compliment). It may be
possible to simplify the expression by
cancelling terms in this expanded form
e.g., to prove the absorption rule:
a + a.b = a
So is equivalent to
DeMorgan’s in Gates
• So the previous function can be built
using 3 NAND gates
a a
b b
f f
c c
d d
DeMorgan’s in Gates
• Similarly, applying ‘bubbles’ to the input
of an AND gate yields
x
f
y Which is a NOT OR
(NOR) gate
What about this gate?
DeMorgan says x . y = x+ y
So is equivalent to
d
• See in a 4 variable map:
– 1 variable term occupies 8 cells
– 2 variable terms occupy 4 cells
– 3 variable terms occupy 2 cells, etc.
K-maps – 4 variables
• For example, plot
f =b f = b .d
c c
cd cd
ab 00 01 11 10 ab 00 01 11 10
00 1 1 1 1 00 1 1
01 01
b b
a
11 a
11
10 1 1 1 1 10 1 1
d d
K-maps – 4 variables
• Simplify, f = a .b.d + b.c.d + a .b.c .d + c.d
c
cd
ab 00 01 11 10
00 1
01 1 1 1 1
b
11 1
a
10 1
c.d
a.b d
d b a.d d a.c
f = b + a.c + a.d
POS Example
• Applying DeMorgans to a
f = b + a.c + a.d c
f
gives, a
f = b.(a + c ).( a + d ) d
f = b.(a + c ).( a + d ) b
a
a
c
c
f
f
a
a
d
d
b
b
Expression in POS form
• Apply DeMorgans and take
complement, i.e., f is now in SOP form
• Fill in zeros in table, i.e., plot f
• Fill remaining cells with ones, i.e., plot f
• Simplify in usual way by grouping ones
to simplify f
Don’t Care Conditions
• Sometimes we do not care about the
output value of a combinational logic
circuit, i.e., if certain input combinations
can never occur, then these are known
as don’t care conditions.
• In any simplification they may be treated
as 0 or 1, depending upon which gives
the simplest result.
– For example, in a K-map they are entered
as Xs
Don’t Care Conditions - Example
• Simplify the function f = a .b .d + a .c.d + a.c.d
With don’t care conditions, a .b .c .d , a .b .c.d , a .b.c .d
c
cd See only need to include
ab 00 01 11 10
00 X 1 1 X Xs if they assist in making
01 X 1
b a bigger group, otherwise
11 1
a can ignore.
10 1
c.d
a.b d
f = a .b + c.d or, f = a .d + c.d
Some Definitions
• Cover – A term is said to cover a minterm if that
minterm is part of that term
• Prime Implicant – a term that cannot be further
combined
• Essential Term – a prime implicant that covers a
minterm that no other prime implicant covers
• Covering Set – a minimum set of prime
implicants which includes all essential terms plus
any other prime implicants required to cover all
minterms