Вы находитесь на странице: 1из 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

DeMorgans Theorem
Example Mary doesnt 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

Specification by Truth Table


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

A B C

N>=310

HET202 Digital Electronics Design

Conversion of TT to expression
m3
A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 X 0 0 0 1 1 1 1 1 minterms ABC m0 ABC m1 ABC m2 ABC m3 ABC m4 ABC m5 ABC m6 ABC m7

m4

m5

m6

m7

X = ABC + ABC + ABC + ABC + ABC = ABC + AB(C+C) + AB(C+C) assoc. = ABC + AB + AB = ABC + A(B+B) = ABC + A = BC + A
C BC

X+X=1 assoc. X+X=1 AX+A=X+A

A B C

N>=310

B A

A+BC

HET202 Digital Electronics Design

Minterms
Minterms are products that involve all the input variables.
# 0 1 2 3 4 5 6 7 A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 m0 m1 abc abc 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 m2 abc 0 0 1 0 0 0 0 0 m3 abc 0 0 0 1 0 0 0 0 m4 abc 0 0 0 0 1 0 0 0 m5 abc 0 0 0 0 0 1 0 0 m6 abc 0 0 0 0 0 0 1 0 m7 abc 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 # 0 1 2 3 4 5 6 7 A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 M1 1 0 1 1 1 1 1 1 M2 1 1 0 1 1 1 1 1 M3 1 1 1 0 1 1 1 1 M4 1 1 1 1 0 1 1 1 M5 1 1 1 1 1 0 1 1 M6 1 1 1 1 1 1 0 1 M7 1 1 1 1 1 1 1 0
(a+b+c) (a+b+c) (a+b+c) (a+b+c) (a+b+c) (a+b+c) (a+b+c) (a+b+c)

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.
# 0 1 2 3 4 5 6 7 A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 minterms ABC m0 ABC m1 ABC m2 ABC m3 ABC m4 ABC m5 ABC m6 ABC m7 maxterms A+B+C A+B+C A+B+C A+B+C A+B+C A+B+C A+B+C A+B+C

M0 M1 M2 M3 M4 M5 M6 M7

HET202 Digital Electronics Design

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 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 X 0 0 0 1 1 1 1 1 minterms ABC m0 ABC m1 ABC m2 ABC m3 ABC m4 ABC m5 ABC m6 ABC m7

Each minterm contributes a 1 to the result

F will be true whenever any minterm is true

F(A,B,C) = ABC + ABC + ABC + ABC + ABC = m3 + m4 + m5 + m6 + m7 = m(3,4,5,6,7)


HET202 Digital Electronics Design 10

Maxterm expression from TT


A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 X 0 0 0 1 1 1 1 1 maxterms A+B+C M0 A+B+C M1 A+B+C M2 A+B+C M3 A+B+C M4 A+B+C M5 A+B+C M6 A+B+C M7

Each maxterm contributes a 0 to the result

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 = ab + ad + acd = ab(c+c)(d+d) + ad(b+b)(c+c) + acd(b+b) = ab(cd+cd+cd+cd)+ad(bc+bc+bc+bc)+ abcd+abcd = abcd+abcd+abcd+abcd+ abcd+abcd+abcd+abcd+ abcd+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 xz+xy=(x+y)(x+z) = (a+(b+d)) (a+acd) = (a+b+d) (a+cd) x+xy=x+y = (a+b+d) (a+c) (a+d) z+xy=(z+x)(z+y), xy+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 Have Minterm expansion of F Maxterm expansion of F Maxterms are those not on the minterm list of F Minterms are those not on the maxterm list of F Minterm expansion of F Maxterm expansion of F

Minterm expansion of F

Maxterm expansion of F

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

HET202 Digital Electronics Design

14

Minterm Maxterm - Example


Want Have
Minterm expansion of F Maxterm expansion of F F(a,b,c) = m(1,4,5,7) F(a,b,c) = M(1,4,5,7) F(a,b,c) = m(0,2,3,6) Minterm expansion of F Maxterm expansion of F F(a,b,c) = M(0,2,3,6) Minterm expansion of F F(a,b,c) = m(0,2,3,6) Maxterm expansion of F F(a,b,c) = M(1,4,5,7)

F(a,b,c) = m(1,4,5,7)

F(a,b,c) = M(0,2,3,6)

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 = abc + abc + abc + abc + abc + 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) = M(0,2,4)

F(w,x,y) = M(1,3,5,6,7) = m(0,2,4)


18

HET202 Digital Electronics Design

Combining Minterm Exprns.


A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 F 1 0 0 1 1 0 1 1 G F.G 0 0 0 0 1 0 1 1 1 1 0 0 0 0 1 1 F+G 1 0 1 1 1 0 1 1

Minterms from either expression

F G F.G F+G

= = = =

m(0, m( m( m(0,

3,4, 2,3,4, 3,4, 2,3,4,

6,7) 7) 7) 6,7)

Minterms common to both expressions


HET202 Digital Electronics Design 19

Combining Minterm Exprns.


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 Exprns.


A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 F 1 0 0 1 1 0 1 1 G F+G F.G 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 0 0 0 0 1 0 1 1 1

Maxterms from either expression

F G F+G F.G

= = = =

M( 1,2, M(0,1, M( 1, M(0,1,2,

5) 5,6) 5) 5,6)

Maxterms common to both expressions


HET202 Digital Electronics Design 21

Combining Maxterm Exprns.


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(2,3,4,5) = M = m m M m M M m M m
24

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

Exercise Solution
m(1,3,5,6,7) M(2,3,4,5)

= M(0,2,4) = m(0,1,6,7) m(0,1,3,5,6,7) M(2,4) m(1,6,7) M(0,2,3,4,5) M(2,4) m(0,1,3,5,6,7) M(0,2,3,4,5) m(1,6,7)
25

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

Incompletely Specified Functions


Sometimes the required function is not fully specified for all input combinations Either
1. We dont care what happens at the output for that situation, or 2. That particular input cant occur because of some other constraint outside the circuit we are dealing with and hence 1 applies.

These input combinations lead to dont care outputs.


HET202 Digital Electronics Design 26

Dont Cares (Dont Minds?)


F=M(2,4,5) D(1,6) F=m(0,3,7) + d(1,6)
Dont care entries

A 0 0 0 0 1 1 1 1

B 0 0 1 1 0 0 1 1

C 0 1 0 1 0 1 0 1

F 1 X 0 1 0 0 X 1

HET202 Digital Electronics Design

27

Example
1-bit Binary Adder
A 0 0 1 1 B 0 1 0 1 S 0 1 1 0 C 0 0 0 1

A B

Sum(A,B)

S C

S = AB + AB C = A.B

= m(1,2) = M(0,3) = m(3) = M(1,2,4)

= AB

HET202 Digital Electronics Design

28

Example - 2-bit Binary Adder


AB 00 00 00 00 01 01 01 01 10 10 10 10 11 11 11 11 CD 00 01 10 11 00 01 10 11 00 01 10 11 00 01 10 11 XYZ 000 001 010 011 001 010 011 100 010 011 100 101 011 100 101 110

A,B C,D

2 2

Sum(A,B)

X,Y,Z

X = m(7,10,11,13,14,15) Y = m(2,3,5,6,8,9,12,15) Z = m(1,3,4,6,9,11,12,14)

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. (Well 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 active-low reset input The circuit is reset whenever the input goes low.

The star (*) is used to indicate a signal with an active-low polarity.

The notation is not used consistently! Sometime written reset.


HET202 Digital Electronics Design 34

Mixed Logic Example


-ve Logic Error1* Error2* +ve Logic

AnyError

HET202 Digital Electronics Design

35

To Do
Add more examples/exercises English description

HET202 Digital Electronics Design

36

Вам также может понравиться