You are on page 1of 36

Application of Boolean Algebra

Formulating Equations
 Example
Mary watches TV if it is Monday night and she
has finished her homework.
Let F = 1 iff Mary watches TV
Let A = 1 iff it is Monday night
Let B = 1 iff she has finished her homework

Then F = A . B

HET202 Digital Electronics Design 2


DeMorgan’s Theorem
 Example
Mary doesn’t watch TV if it is not Monday night
or she has not finished her homework.
Let F = 1 iff Mary watches TV
Let A = 1 iff it is Monday night
Let B = 1 iff she has finished her homework

Then F’ = A’ + B’ or F = (A’ + B’)’

HET202 Digital Electronics Design 3


Specification by Truth Table
 Input - 3-bit number, ABC
 Design a circuit whose output is 1 when
the input >= 0112
A B C X
0 0 0 0
0 0 1 0 A
0 1 0 0
0 1 1 1
B N>=310 X
1 0 0 1 C
1 0 1 1
1 1 0 1
1 1 1 1

HET202 Digital Electronics Design 4


Conversion of TT to expression
m3 m4 m5 m6 m7
A B C X minterms X = A’BC + AB’C’ + AB’C + ABC’ + ABC
0 0 0 0 A’B’C’ m0
0 0 1 0 A’B’C m1
= A’BC + AB’(C+C’) + AB(C+C’) assoc.
0 1 0 0 A’BC’ m2 = A’BC + AB’ + AB X+X’=1
0 1 1 1 A’BC m3
1 0 0 1 AB’C’ m4 = A’BC + A(B’+B) assoc.
1 0 1 1 AB’C m5
1 1 0 1 ABC’ m6
= A’BC + A X+X’=1
1 1 1 1 ABC m7 = BC + A A’X+A=X+A
C
BC
A B A+BC
B N>=310 X
C A

HET202 Digital Electronics Design 5


Minterms
 Minterms are products that involve all
the input variables.
m0 m1 m2 m3 m4 m5 m6 m7
# A B C a’b’c’ a’b’c a’bc’ a’bc ab’c’ ab’c abc’ abc
0 0 0 0 1 0 0 0 0 0 0 0
1 0 0 1 0 1 0 0 0 0 0 0
2 0 1 0 0 0 1 0 0 0 0 0
3 0 1 1 0 0 0 1 0 0 0 0
4 1 0 0 0 0 0 0 1 0 0 0
5 1 0 1 0 0 0 0 0 1 0 0
6 1 1 0 0 0 0 0 0 0 1 0
7 1 1 1 0 0 0 0 0 0 0 1
Any function may be constructed by a sum-of-minterms.
Each minterm contributes a ‘1’ to the result for a particular
input combination.
HET202 Digital Electronics Design 6
Maxterms
 Maxterms are sums that involve all the
input variables.
M0 M1 M2 M3 M4 M5 M6 M7
# A B C (a+b+c) (a+b+c’) (a+b’+c) (a+b’+c’) (a’+b+c) (a’+b+c’) (a’+b’+c) (a’+b’+c’)
0 0 0 0 0 1 1 1 1 1 1 1
1 0 0 1 1 0 1 1 1 1 1 1
2 0 1 0 1 1 0 1 1 1 1 1
3 0 1 1 1 1 1 0 1 1 1 1
4 1 0 0 1 1 1 1 0 1 1 1
5 1 0 1 1 1 1 1 1 0 1 1
6 1 1 0 1 1 1 1 1 1 0 1
7 1 1 1 1 1 1 1 1 1 1 0
Any function may be constructed by a product-of-maxterms.
Each maxterm contributes a ‘0’ to the result for a particular
input combination.
HET202 Digital Electronics Design 7
Minterms and Maxterms
 Think about each minterm or maxterm
contributing a ‘1’ or ‘0’ to the result.

# A B C minterms maxterms
0 0 0 0 A’B’C’ m0 A+B+C M0
1 0 0 1 A’B’C m1 A+B+C’ M1
2 0 1 0 A’BC’ m2 A+B’+C M2
3 0 1 1 A’BC m3 A+B’+C’ M3
4 1 0 0 AB’C’ m4 A’+B+C M4
5 1 0 1 AB’C m5 A’+B+C’ M5
6 1 1 0 ABC’ m6 A’+B’+C M6
7 1 1 1 ABC m7 A’+B’+C’ M7

HET202 Digital Electronics Design 8


Minterms and Maxterms
 Any expression may be expanded into SOP
using minterms or a POS using maxterms
 These forms are unique (effectively they are
a direct rendering of the truth table as a
equation).
 Terms used: minterm expansion, maxterm
expansion, ‘standard forms’ or canonical
forms.
 Truth-table or algebraic expansion may be
used to obtain the expressions.

HET202 Digital Electronics Design 9


Minterm expression from TT
A B C X minterms
0 0 0 0 A’B’C’ m0
0 0 1 0 A’B’C m1
0 1 0 0 A’BC’ m2
Each minterm
0 1 1 1 A’BC m3
1 0 0 1 AB’C’ m4 contributes a 1
1 0 1 1 AB’C m5 to the result
1 1 0 1 ABC’ m6
1 1 1 1 ABC m7

F will be true whenever any minterm is true


 F(A,B,C) = A’BC + AB’C’ + AB’C + ABC’ + ABC
= m3 + m4 + m5 + m6 + m7
= Σm(3,4,5,6,7)
HET202 Digital Electronics Design 10
Maxterm expression from TT
A B C X maxterms
0 0 0 0 A+B+C M0
0 0 1 0 A+B+C’ M1
0 1 0 0 A+B’+C M2 Each maxterm
0 1 1 1 A+B’+C’ M3 contributes a 0
1 0 0 1 A’+B+C M4 to the result
1 0 1 1 A’+B+C’ M5
1 1 0 1 A’+B’+C M6
1 1 1 1 A’+B’+C’ M7

F will be false whenever any maxterm is false


 F(A,B,C) = (A+B+C) (A+B+C’) (A+B’+C)
= M0M1M2
= ΠM(0,1,2)
HET202 Digital Electronics Design 11
Algebraic Minterm Expansion
 Change to SOP form and expand each product using
(X+X’) = 1
 Example: F(a,b,c,d) = a’(b’+d)+acd’
= a’b’ + a’d + acd’
= a’b’(c+c’)(d+d’) + a’d(b+b’)(c+c’) + acd’(b+b’)
= a’b’(c’d’+c’d+cd’+cd)+a’d(b’c’+b’c+bc’+bc)+
ab’cd’+abcd’
= a’b’c’d’+a’b’c’d+a’b’cd’+a’b’cd+
a’b’c’d+a’b’cd+a’bc’d+a’bcd+
ab’cd’+abcd’
= m0+m1+m2+m3+m1+m3+m5+m7+m10+m14
= m0+m1+m2+m3+m5+m7+m10+m14
= Σm(0,1,2,3,5,7,10,14)
= ΠM(4,6,8,9,11,12,13,15)
HET202 Digital Electronics Design 12
Algebraic Maxterm Expansion
 Change to POS form and expand products using x=(x+y)(x+y’)
 Example: F(a,b,c,d) = a’(b’+d)+acd’
= (a+(b’+d)) (a’+acd’) xz+x’y=(x+y)(x’+z)
= (a+b’+d) (a’+cd’) x+x’y=x+y
= (a+b’+d) (a’+c) (a’+d’) z+xy=(z+x)(z+y), x’y+x=y+x
= (a+b’+c’+d) (a+b’+c+d) (a’+b’+c) (a’+b+c) (a’+b’+d’)
(a’+b+d’) x=(x+y)(x+y’)
= (a+b’+c’+d) (a+b’+c+d) (a’+b’+c+d’) (a’+b’+c+d)
(a’+b+c+d’) (a’+b+c+d) (a’+b’+c’+d’) (a’+b’+c+d’)
(a’+b+c’+d’) (a’+b+c+d’)
= M6 • M4 • M13 • M12 • M9 • M8 • M15 • M13 • M11 • M9
= M4 • M6 • M8 • M9 • M9 • M11 • M12 • M13 • M13 • M15
= ΠM(4,6,8,9,11,12,13,15)

HET202 Digital Electronics Design 13


Minterm ⇔ Maxterm

Want ⇒
Minterm Maxterm Minterm Maxterm
Have expansion expansion expansion expansion
⇓ of F of F of F’ of F’

Maxterms Minterms
Maxterms
Minterm are those are those
are those on
expansion not on the not on the
the minterm
of F minterm list minterm list
list of F
of F of F
Minterms Minterms Maxterms
Maxterm are those are those on are those
expansion not on the the not on the
of F maxterm list maxterm list maxterm list
of F of F of F

HET202 Digital Electronics Design 14


Minterm ⇔ Maxterm - Example

Want ⇒
Minterm Maxterm Minterm Maxterm
Have expansion expansion expansion expansion
of F of F of F’ of F’

Minterm F(a,b,c) = F(a,b,c) = F(a,b,c) = F(a,b,c) =


expansion Σm(1,4,5,7) ΠM(0,2,3,6) Σm(0,2,3,6) ΠM(1,4,5,7)
of F

Maxterm F(a,b,c) = F(a,b,c) = F(a,b,c) = F(a,b,c) =


expansion ΠM(1,4,5,7) Σm(0,2,3,6) Σm(1,4,5,7) ΠM(0,2,3,6)
of F

HET202 Digital Electronics Design 15


Exercise
 Convert the following expressions to
minterm and maxterm forms (as
appropriate):
 F(a,b,c) = a+b.c
 F(w,x,y) = Π(1,3,5,6,7)
 F(u,v,w) = Σ(1,3,5,6,7)

HET202 Digital Electronics Design 16


Exercise – Working
F(a,b,c) = a+b.c

F(u,v,w) = Σm(1,3,5,6,7) F(w,x,y) = ΠM(1,3,5,6,7)

HET202 Digital Electronics Design 17


Exercise – Solution *
F(a,b,c) = a+b.c
= ab’c’ + a’b’c + ab’c + abc + a’bc + abc
= m4 + m5 + m6 + m7 + m3 + m7
= m3 + m4 + m5 + m6 + m7
= Σ (3,4,5,6,7)
= Π (0,1,2)
= (a+b+c)(a+b+c’)(a+b’+c)

F(u,v,w) = Σm(1,3,5,6,7) F(w,x,y) = ΠM(1,3,5,6,7)


= ΠM(0,2,4) = Σm(0,2,4)

HET202 Digital Electronics Design 18


Combining Minterm Expr’ns.
Minterms
from either
A B C F G F.G F+G
expression
0 0 0 1 0 0 1
0 0 1 0 0 0 0 F = Σm(0, 3,4, 6,7)
0 1 0 0 1 0 1
0 1 1 1 1 1 1
G = Σm( 2,3,4, 7)
1 0 0 1 1 1 1 F.G = Σm( 3,4, 7)
1 0 1 0 0 0 0
1 1 0 1 0 0 1 F+G = Σm(0, 2,3,4, 6,7)
1 1 1 1 1 1 1
Minterms
common to both
expressions
HET202 Digital Electronics Design 19
Combining Minterm Expr’ns.
 When ANDing two minterm expressions
the resulting minterm expression only
contains the minterms common to both
expressions.
 When ORing two minterm expressions
the resulting minterm expression
contains the minterms from either
expressions.

HET202 Digital Electronics Design 20


Combining Maxterm Expr’ns.
Maxterms
from either
A B C F G F+G F.G
expression
0 0 0 1 0 1 0
0 0 1 0 0 0 0 F = ΠM( 1,2, 5)
0 1 0 0 1 1 0 G = ΠM(0,1, 5,6)
0 1 1 1 1 1 1
1 0 0 1 1 1 1 F+G = ΠM( 1, 5)
1 0 1 0 0 0 0
1 1 0 1 0 1 0 F.G = ΠM(0,1,2, 5,6)
1 1 1 1 1 1 1
Maxterms
common to both
expressions
HET202 Digital Electronics Design 21
Combining Maxterm Expr’ns.
 When ORing two maxterm expressions
the resulting maxterm expression
contains the maxterms common to both
expressions.
 When ANDing two maxterm expressions
the resulting maxterm expression
contains the maxterms from either
expressions.

HET202 Digital Electronics Design 22


Exercise
 Find minterm and maxterm expressions
for the following equations in F(a,b,c):
Σm(1,3,5,6,7)
ΠM(2,3,4,5)
Σm(1,3,5,6,7) + Σm(0,1,6,7)
Σm(1,3,5,6,7) • Σm(0,1,6,7)
ΠM(0,2,4) + ΠM(2,3,4,5)
ΠM(0,2,4) • ΠM(2,3,4,5)

HET202 Digital Electronics Design 23


Exercise – Working
Σm(1,3,5,6,7) = ΠM
ΠM(2,3,4,5) = Σm

Σm(1,3,5,6,7) + Σm(0,1,6,7) = Σm
= ΠM
Σm(1,3,5,6,7) • Σm(0,1,6,7) = Σm
= ΠM
ΠM(0,2,4) + ΠM(2,3,4,5) = ΠM
= Σm
ΠM(0,2,4) • ΠM(2,3,4,5) = ΠM
= Σm
HET202 Digital Electronics Design 24
Exercise – Solution *
Σm(1,3,5,6,7) = ΠM(0,2,4)
ΠM(2,3,4,5) = Σm(0,1,6,7)

Σm(1,3,5,6,7) + Σm(0,1,6,7)= Σm(0,1,3,5,6,7)


= ΠM(2,4)
Σm(1,3,5,6,7) • Σm(0,1,6,7) = Σm(1,6,7)
= ΠM(0,2,3,4,5)
ΠM(0,2,4) + ΠM(2,3,4,5) = ΠM(2,4)
= Σm(0,1,3,5,6,7)
ΠM(0,2,4) • ΠM(2,3,4,5) = ΠM(0,2,3,4,5)
= Σm(1,6,7)
HET202 Digital Electronics Design 25
Incompletely Specified Functions
 Sometimes the required function is not
fully specified for all input combinations
 Either
1. We don’t care what happens at the output for
that situation, or
2. That particular input can’t occur because of
some other constraint outside the circuit we are
dealing with and hence 1 applies.
 These input combinations lead to “don’t
care” outputs.

HET202 Digital Electronics Design 26


Don’t Cares (Don’t Minds?)

A B C F
F=Π
ΠM(2,4,5) • ΠD(1,6)
0 0 0 1 F=Σ
Σm(0,3,7) + Σd(1,6)
0 0 1 X
0 1 0 0
0 1 1 1
1 0 0 0
Don’t care
1 0 1 0 entries
1 1 0 X
1 1 1 1

HET202 Digital Electronics Design 27


Example
 1-bit Binary Adder
A B S C
0 0 0 0 A S
0 1 1 0 Sum(A,B)
B C
1 0 1 0
1 1 0 1

S = A’B + AB’ = Σm(1,2) = ΠM(0,3) = A⊕B


C = A.B = Σm(3) = ΠM(1,2,4)

HET202 Digital Electronics Design 28


Example - 2-bit Binary Adder
AB CD XYZ
00 00 000 2
00 01 001 A,B 3
00 10 010 2 Sum(A,B) X,Y,Z
00 11 011 C,D
01 00 001
01 01 010
01 10 011 X = Σm(7,10,11,13,14,15)
01 11 100
10 00 010 Y = Σm(2,3,5,6,8,9,12,15)
10 01 011
10 10 100 Z = Σm(1,3,4,6,9,11,12,14)
10 11 101
11 00 011
11 01 100
11 10 101
11 11 110

HET202 Digital Electronics Design 29


Exercise
 Design a minterm expression for a
circuit that takes a 4-bit BCD number
as input and has a single output that is
true when the number is prime. (We’ll
assume 1 is prime!)
 Determine the maxterm expression
that has the same function.

HET202 Digital Electronics Design 30


Exercise - Working
 F(a,b,c,d) =

 F(a,b,c,d) =

HET202 Digital Electronics Design 31


Exercise - Solution *
 F(a,b,c,d) = Σm(1,2,3,5,7) +
Σd(10,11,12,13,14,15)

 F(a,b,c,d) = ΠM(0,4,6,8,9) •
ΠD(10,11,12,13,14,15)

HET202 Digital Electronics Design 32


Logic Polarity
 The choice of which level signal is
‘active’ in a digital circuit is quite
arbitrary. For example, most reset
inputs on counters, flip-flops and
microcontrollers have effect when they
are taken low.
 Such an input is said to be active when
low or “active low”.

HET202 Digital Electronics Design 33


Active Low

reset* reset

Component with
The star (‘*’) is used to active-low reset input
The circuit is reset
indicate a signal with
whenever the input
an active-low polarity. goes low.

The notation is not used consistently!


Sometime written reset.

HET202 Digital Electronics Design 34


Mixed Logic Example

-ve Logic +ve Logic

Error1*
AnyError
Error2*

HET202 Digital Electronics Design 35


To Do
 Add more examples/exercises
 English description

HET202 Digital Electronics Design 36

You might also like