lecture_4_minterm_and_maxterm
lecture_4_minterm_and_maxterm
Conversion of English
sentences to Boolean equations.
• Example
– The alarm will ring iff the alarm
switch is on and the door is not
closed or it is after 6 PM and the
window is not closed.
– Boolean equation
• Z = AB’ + CD’
• If Z = 1 , the alarm will ring.
• Draw the network. Z will drive the
alarm.
Chap 4 C-H1
Combinational Network Specified
in a Truth Table
• Problem statement
Input 3 bits A, B, C = Binary
number N. Output f. Output f = 1
if N >= 011 and f = 0 if N < 011.
ABC f
000 0
001 0
010 0
011 1
100 1
101 1
110 1
111 1
Chap 4 C-H2
Derive Algebraic
Expression from Truth
Table
• Using f = 1gives the SOP form.
Chap 4 C-H3
Minterm and Maxterm
Minterm
– A minterm of n variables = product of n
literals in which each variable appears
exactly once either in T or F form, but
not in both. (Also known as a standard
product term)
– Each minterm has value 1 for exactly
one combination of values of variables.
E.g. ABC, 111 => m7
– A function can be written as a sum of
minterms, which is referred to as a
minterm expansion or a standard sum
of products.
Chap 4 C-H4
Minterm/Maxterm
Three variables
Chap 4 C-H5
Minterm Notation
f = A’BC + AB’C’ + AB’C + ABC’
+ABC;
The other way to represent f is:
f (A,B,C) = m3 + m4 + m5 + m6 + m7
or
f (A,B,C) = m(3,4,5,6,7)
Another view,
f (A,B,C) =0.m0+ 0.m1 +0.m2+ 1. m3
+1. m4 +1. m5 +1. m6 +1. m7
• Maxterm
– A maxterm of n variables = sum of n
literals in which each variable appears
exactly once in T or F from, but not in
both.
– Each maxterm has a value of 0 for
exactly one combination of values of
variables. E. g. A + B + C’, 001 => M1
(the value is 0).
– Therefore Mi = m’i.
– A function can be written as a product
of maxterms, which is referred to as a
maxterm expansion or a standard
product of sums.
Chap 4 C-H7
Maxterm Notation
f = (A+B+C)(A+B+C’)
(A+B’+C)
f (A,B,C) = M0M1M2 or
f (A,B,C) = M (0,1,2)
Maxterms present in f
correspond with the 0’s of f in
the truth table.
Chap 4 C-H8
M and m Relationship
Chap 4 C-H9
Complement of minterm
Chap 4 C-H10
Find the Minterm
Expansion
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’ + a’b’c’d + a’b’cd’
+a’b’cd + a’bc’d + a’bcd +
abcd’ +ab’cd’
= Σm(0,1,2,3,5,7,10,14)
What is the maxterm expansion
for f?
Chap 4 C-H11
Find the Maxterm
Expansion
f(a,b,c,d) = a’(b’+d) + acd’.
= (a’+cd’)(a +b’+d); Use (x+y)(x’+z)=xz +x’y.
= (a’+c)(a’+d’)(a+b’+d); Use (x+y)(x+z) = x+yz.
= (a’+bb’+c+dd’)(a’+bb’+cc’+d’)(a+b’+cc’+d)
= (a’+bb’+c+d)(a’+bb’+c+d’)(a’+bb’+c+d’)
(a’+bb’+c’+d’)(a+b’+cc’+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)
=ΠM(4,6,8,9,11,12,13,15);
primed = 1, unprimed = 0. Note that maxterm = 0.
Chap 4 C-H12
General Expressions
• n variables (i = 0 to 2n-1values)
Minterm : F =Σaimi
If ai = 1, then minterm mi exists.
Maxterm : F =Π(ai+Mi);
If ai = 1, then the maxterm does
not exist.
Chap 4 C-H14
Minterm Expansion for
Don’t Care
• Example
– Minterm
• F = Σm(0,3,7) + Σd(1,6)
– Maxterm
• F = ΠM(2,4,5) . ΠD(1,6)
Chap 4 C-H15
Don’t Care
What if
ABC f
x x 0 1
f = c’
f = 000
010
100
110
Chap 4 C-H16
Examples
Chap 4 C-H17
Full Adder
• One bit
Chap 4 C-H18
2’s Complement Adder
Chap 4 C-H19
Full Adder Using Gates
xi yi
module fulladd (Cin, x, y, s,
ci 00 01 11 10 Cout);
0 1 1 input Cin, x, y;
ci xi yi ci + 1 si
1 1 1
output s, Cout;
0 0 0 0 0
0 0 1 0 1
si = xi yi ci
0 1 0 0 1 xor (s, x, y, Cin);
0 1 1 1 0
1 0 0 0 1
ci
xi yi
and (a, x, y);
1 0 1 1 0 00 01 11 10
1 1 0 1 0
0 1
and (b, x, Cin);
1 1 1 1 1
and (c, y, Cin);
1 1 1 1
or (Cout, a, b, c);
(a) Truth table
ci + 1 = xi yi + xi ci + yi ci
yi si
endmodule
20
Full Adder Using
Functional Expression
xi yi
ci 00 01 11 10
0 1 1
ci xi yi ci + 1 si
1 1 1
0 0 0 0 0
0 0 1 0 1
si = xi yi ci
0 1 0 0 1
0 1 1 1 0 xi yi
1 0 0 0 1
ci 00 01 11 10
1 0 1 1 0
1 1 0 1 0
0 1
module fulladd (Cin, x, y, s, Cout);
1 1 1 1 1
input Cin, x, y;
1 1 1 1
ci +1
(c) Circuit
21
3-bit Ripple Adders
assign s = x ^ y ^ Cin,
assign Cout = (x & y) | (x & Cin) | (y &
Cin);
endmodule
22
3-bit Ripple Adders
Using
Vectored Signals
module adder3 (c0, x2, x1, x0, y2, y1, y0, s2, s1, s0,
carryout);
input c0, x2, x1, x0, y2, y1, y0;
output s2, s1, s0, carryout;
endmodule
23
Overflow and Carry-Out
detection
For unsigned number
carry out from n-1 bit position:
Hence,
carryout = xn-1 yn-1 + ~sn-1 xn-1 + ~sn-1 yn-1
24