Deld Unit II
Deld Unit II
4
MINTERMs & MAXTERMs
Input Variables Minterms Maxterms
x y z Term Designation Term Designation
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
MINTERMs & MAXTERMs
7
Product of Maxterms Form
• Every function can be written as a product of maxterms, which is a
special kind of product of sums form
• The product of maxterms form for any function is unique
• If you have a truth table for a function, you can write a product of
maxterms expression just by picking out the rows of the table where
the function output is 0
• f = (x’+y+z).(x’+y+z’).(x’+y’+z’)
= M 4 . M 5 . M7
= πM(4,5,7)
• f’ = (x+y+z) . (x+y+z’) . (x+y’+z) .
(x+y’+z’) . (x’+y’+z’)
= M 0 . M1 . M2 . M 3 . M 6
= πM(0,1,2,3,6)
• f’ contains all the maxterms not in f
8
Conversion between minterms
& Maxterms equation
f = x’y’z’ + x’y’z + x’yz’ + x’yz + xyz’
= m0 + m1 + m2 + m3 + m6
= Σm(0,1,2,3,6) = = πM(4,5,7)
f’ = xy’z’ + xy’z + xyz
= m4 + m5 + m7
= Σm(4,5,7) = πM(0,1,2,3,6)
f = (x’+y+z).(x’+y+z’).(x’+y’+z’)
= M4 . M5 . M7
= πM(4,5,7) = Σm(0,1,2,3,6)
f’ = (x+y+z) . (x+y+z’) . (x+y’+z) .
(x+y’+z’) . (x’+y’+z’)
= M0 . M1 . M2 . M3 . M6
= πM(0,1,2,3,6) = Σm(4,5,7)
Logic Function Simplification
• Why simplify?
– Simpler expression uses less logic gates
– Thus: cheaper, less power, faster (sometimes)
• Simplification techniques:
– Algebraic Simplification
• Simplify Boolean functions by means of basic identities and theorems
• Requires skill and it lacks specific rules to predict each succeeding step in the
minimization process
– Karnaugh Maps - A graphical technique for simplifying an expression
• Advantages
– A more orderly process with well-defined steps compared with the trial-and-
error process sometimes used in algebraic simplification
– Always able to produce a minimum expression
• Disadvantage: Limited to 5 or 6 variables
– Quine-McCluskey
• Suitable for automation
• Can handle many variables (but computationally intensive)
10
Description of K-map and Terminology
11
2 Variable K map
• A two-variable function has four possible minterms. We can re-arrange these
minterms into a Karnaugh map
12
3 Variables K-Maps
• There are 8 minterms for 3 variables (a, b, c). Therefore, there are 8 cells in a
3 variable K-map b b
bc bc
a a
00 01 11 10 00 01 11 10
0 a'b'c' a'b'c a'bc a'bc' 0 m0 m1 m3 m2
c c
• Above arrangement ensures that minterms of adjacent cells differ by just one
variable both horizontally and vertically.
• Each cell in a 3-variable K-map has 3 adjacent neighbours.
13
4 Variable K-maps
• Total cells are 16, representing 16 minterms possible with 4
variables.
• There are 2 wrap-arounds: a horizontal wrap-around and a
vertical wrap-around
• Every cell thus has 4 neighbours. For example, the cell
corresponding to minterm m0 has neighbours m1, m2, m4 and m8
yz y
in an n-variable K-map, wx
m0 m1 m3 m2
each cell has n adjacent m4 m5 m7 m6
w
m8 m9 m11 m10
14
Adjacencies
• Adjacencies on three and four-variable maps
15
Remarks about Groups
• Groups of minterms must be:
(1) Rectangular, and
(2) Have size in powers of 2’s (i.e. 1, 2, 4, 8, 16 etc.)
Otherwise they are invalid groups. Some examples of invalid
groups are:
1 1 1 1
1 1 1 1
1 1 1
1 1 1 1 1
1 1 1 1
1 1 1 1
1 1 1
1 1 1 1 1
1 1 1 1
1 1 1 1
1 1 1
1 1 1 1 1
1 1 1 1 1 1
🗴 ✓
1 1 1 1 1 1
PIs and EPIs (3/3)
• No redundant groups:
1 1 1 1
1
1
1
1
🗴 1
1
1
1
✓
1 1 1 1
Grouping a pair
of adjacent 1s
eliminates one
variable that
appears in both
complemented
and
uncomplemented
form
22
Examples of Grouping Fours 1s
(Quads)
Grouping a quad
of adjacent 1s
eliminates the
two variables
that appears in
both
complemented
and
uncomplemented
form
23
Examples of Grouping Eight 1s (Octets)
• Grouping an octet
of adjacent 1s
eliminates the
three variables
that appears in
both
complemented
and
uncomplemented
form
• In General, group of 2n
variables, eliminates n
variables from Boolean
function.
24
Complete Simplification Process
⮚ Write product term for all the groups(EPI’s) & Form the
OR sum of all the terms generated by each group.
25
K-Map Simplification of POS Expression -
Example CD1: F = π M(0,1,2,8,9,10,11,14,15)
AB How Many 0’s? –
00 01 11 10
How to cover these 0’s?
00 i.e. Groups-
0 1 3 2 1.Octets –
01
6 2.Quads-
4 5 7
11
12 13 15 14 3.Pairs-
10
8 9 11 10 4. Isolated 1’s -
• For this map, there are two possible Groupings, which require only
four pairs. Figure (a) shows one solution and Figure (b) shows the
other. Both expressions are of the same complexity, and so neither is
better than the other
32
Converting to Minterms Form
33
Example
• Use a K map to simplify
• Solution:
• Step 1: Multiply out the first term to get
36
Example of Don’t Care Condition
Simplification
• Don't-care conditions should be changed to either 0 or 1 to
produce K-map looping that yields the simplest expression
37
Don’t Care Condition: Example 1
C
CD
• For comparison: AB 00 01 11 10
– WITHOUT Don’t-cares:
00
1 1
P = A'B'C'D’ + A'B'CD + A'BC'D 01
1 1
B
+ A'BCD' + AB'C'D 11
A
10 1
• Note: Cells with ‘0’ are not D
shown for clarity C
CD
AB 00 01 11 10
00 1 1
– WITH Don’t-cares:
P = A'B'C'D' + B'CD + BC'D 1
01
1
B
+ BCD' + AD 11 X X X X
A
10 1 X X
38
Example 2
• Simplify the Boolean function represented by the following truth table.
Note don’t care conditions are marked as X’s in the truth table
39
Example 2 (Cont.)
40
Ex- OR & Ex NOR Simplification on K
Map
41
Diagonal & Offset Adjacencies
42
Checkerboard Pattern in K-Map
• When we rearrange the Exclusive-OR truth table to a K-Map as
shown below, we would observe Karnaugh map displays a
checkerboard pattern (every other square) of 0s and 1s and we
cannot form any groups on the map
• On a Karnaugh map diagonally adjacent terms can be simplified by
using either XOR or XNOR functions as functional elements
Truth table of K-Map for 2 variables K-Map for 3 variables K-Map for 4
EX-OR gate variables
43
Odd and Even Functions
• For more than 2 inputs, XOR is called an odd function
– It is equal to 1 if the input variables have an odd number of 1’s
• Similarly, for more than 2 inputs, XNOR is called an even function
– It is equal to 1 if the input variables have an even number of 1’s
44
Odd and Even Function Examples
45
MORE EXAMPLES (1/6)
• Example #2:
F(A,B,C,D) = A⋅B⋅C + B'⋅C⋅D' + A⋅D + B'⋅C'⋅D'
A
AB
CD 00 01 11 10
00 1 1
Fill in the 1’s.
01 1 1
D
11 1 1
C
10 1 1 1
B
MORE EXAMPLES (2/6)
• Example #2:
F(A,B,C,D) = A⋅B⋅C + B'⋅C⋅D' + A⋅D + B'⋅C'⋅D'
A
AB
CD 00 01 11 10
00 1 1
01 1 1
D Find all PIs:
11 1 1
C
10 1 1 1
A
AB
CD 00 01 11 10
00 X 1
Fill in the 1’s and X’s.
01 X
D
11 X X 1
C
10 1 1
B
MORE EXAMPLES (4/6)
• Example #3 (with don’t-cares):
F(A,B,C,D) = Σm(2,8,10,15) + Σd(0,1,3,7)
A Do we need to have an
AB
CD 00 01 11 10 additional term A'⋅B' to
00 X 1 cover the 2 remaining X’s?
01 X
D
11 X X 1
C
10 1 1
Answer: F(A,B,C,D) =
MORE EXAMPLES (5/6)
• Find the simplest POS expression for example #2:
F(A,B,C,D) = A⋅B⋅C + B'⋅C⋅D' + A⋅D + B'⋅C'⋅D'
K-map of F’:
Answer in
SOP Form
S(X,Y) = Σ (1,2)
S = X⊕Y
X Y S C-out X
0 0 0 0 Y
Sum S
0 1 1 0
1 0 1 0 C-out
1 1 0 1
58
Full Adder
• Adding two single-bit binary Sum S X
Y
The S function is the three-bit XOR function (Odd
Function): S = X ⊕ Y ⊕ (C-in)
Carry C-out X
XY
C-in 00 01 11 10
0 2 6 4
0 1
1 3 7 5
1 1 1 1 C-in
Y
C-out = XY + X(C-in) + Y(C-in)
Full Adder Circuit using XOR and Basic Gates
• Logical Implementation
Full Adder implemented by Two Half
Adders and an OR Gate
• A ‘Full Adder’ can also be implemented using
two half adders and an ‘OR’ Gate as follows:
The sum S = X ⊕ Y ⊕ (C-in)
The carry out
Full Adder implemented by Two Half
Adders and an OR Gate
• Therefore and
A=B: E = A0 ʘ B0
Digital Components
■ High level digital circuit designs are normally made
using collections of logic gates referred to as
components, rather than using individual logic gates
■ Levels of integration (numbers of gates) in an
integrated circuit (IC):
■ Small scale integration (SSI): 10-100 gates
■ Medium scale integration (MSI): 100 to 1000 gates
■ Large scale integration (LSI): 1000-10,000 logic gates
■ Very large scale integration (VLSI): 10,000-upward
■ Common MSI circuits include encoders, decoders,
multiplexers, and demultiplexers
What we need to know about an MSI
circuit?
■ Function: what it does
■ Truth-table: input-output
■ Logic gate diagram: how it does it
■ Packaging (module pin-out): how to build it
■ Dynamic behavior (timing diagram):
■ Applications: where to use it
Multiplexers and De-Multiplexers
■ A multiplexer or mux selects one data line from two or more input
lines and routes data from the selected line to the output. The
particular data line that is selected is determined by the select
inputs
■ A demultiplexer or Demux performs the opposite function from a
MUX. It switches data from one input line to two or more data lines
depending on the select inputs
MULTIPLEXERS (1/5)
■ A multiplexer is a device which has
■ A number of input lines
■ A number of selection lines
■ One output line
■ It steers one of 2n inputs to a single output line, using n
selection lines. Also known as a data selector.
2n:1
inputs : Multiplexer output
...
MSB
select LSB
MULTIPLEXERS (2/5)
■ Truth table for a 4-to-1 multiplexer:
Inputs Inputs
I0 0 I0
I1 4:1 I1
1 4:1
MUX Y
I2 2 Y Output I2 mux
I3 3 I3
S1 S0
S1 S0
select select
MULTIPLEXERS (3/5)
■ Output of multiplexer is
“sum of the (product of data lines and selection lines)”
■ Example: Output of a 4-to-1 multiplexer is:
Y=?
■ A 2n-to-1-line multiplexer, or simply 2n:1 MUX, is made
from an n:2n decoder by adding to it 2n input lines, one to
each AND gate.
MULTIPLEXERS (4/5)
■ A 4:1 multiplexer circuit:
I0
I1
Y
I2
I3
S1 S0
MULTIPLEXERS (5/5)
■ An application:
I0
I1 4:1
I2 MUX
I3
2:1
S1 S0 MUX Y
I4
I5 4:1
I6 MUX S2
I7
S1 S0
LARGER MULTIPLEXERS (2/4)
I0
I0 I1 I2
I1 4:1
I2 MUX
I3
2:1
S1 S0 MUX Y I0 I1 I6
I4
I5 4:1 I4 I5 I6
I6 MUX S2
I7
S1 S0
I2 2:1 I2 S0
I3 MUX
4:1
S0 MUX Y I0
I4 2:1 I4
I5 MUX
S2 S1
S0 I6 2:1 Q: Can we use only 2:1
I7 MUX I6
multiplexers?
S0
MULTIPLEXERS: IMPLEMENTING FUNCTIONS (1/3)
■ Boolean functions can be implemented using multiplexers.
■ A 2n-to-1 multiplexer can implement a Boolean function of
n input variables, as follows:
1. Express in sum-of-minterms form. Example:
F(A,B,C) = A'⋅B'⋅C + A'⋅B⋅C + A⋅B'⋅C + A⋅B⋅C'
= Σ m(1,3,5,6)
2. Connect n variables to the n selection lines.
3. Put a ‘1’ on a data line if it is a minterm of the function, or ‘0’
otherwise.
MULTIPLEXERS: IMPLEMENTING FUNCTIONS (2/3)
■ F(A,B,C) = Σ m(1,3,5,6)
A B C
MULTIPLEXERS: IMPLEMENTING FUNCTIONS (3/3)
■ Example: Use a 74151A to implement
f(x1,x2,x3) = Σ m(0,2,3,5)
1 0
1 1
0 2 1 0
1 3 mux F
C 1 F
0 4 mux
0 5 0 2
1 6 C' 3
0 7
A B C A B
MUX
A B C F
input
0 0 0 1
0 0 1 1 ? 0
0 1 0 0 ? 1 F
mux
0 1 1 1 ? 2
1 0 0 0 ? 3
1 0 1 0
1 1 0 1 A B
1 1 1 0
◈
USING SMALLER MULTIPLEXERS (6/6)
■ Example: Implement the function below with 74151A:
f(x1,x2,x3,x4) = Σ m(0,1,2,3,4,9,13,14,15)
■ Hardware Reduction Table
f(A,B,C) = m(1,2,4,7)
D0 D1 D2 D3
0 2 4 6
C
C 1 3 5 7
i/p to MUX C C C C
D0 D1 D2 D3
0 1 2 3
A
A 4 5 6 7
i/p to MUX A A A A
DEMULTIPLEXERS (1/4)
■ Given an input line and a set of selection lines, a
demultiplexer directs data from the input to one of the
selected output line.
■ Example: 1-to-4 demultiplexer.
Outputs
Y0 = D∙S1'∙S0'
Y1 = D∙S1'∙S0
Data D demux
Y2 = D∙S1∙S0'
Y3 = D∙S1∙S0
S1 S0
select
DEMULTIPLEXERS (2/4)
■ It turns out that the demultiplexer circuit is actually
identical to a decoder with enable.
2×4 0 Y0 = ?
Decoder 1
S1 A Y1 = ?
S0 B 2 Y2 = ?
3 Y3 = ?
E
D
Implementation of Boolean Function Using Demultiplexer (3/4)
Example 1: Implement the Function f(A,B,C)=m(0,1,3,5) using 1:8 demultiplexer.
Example 2: Full adder implementation using Demultiplexer
(4/4)
S(A,B,Cin) = ∑(1,2,4,7)
Cout(A,B,Cin) = ∑(3,5,6,7)
Decoders
■ A combinational circuit that converts binary
information from n coded inputs to a maximum 2n
coded outputs → n to 2n decoder
■ n-to-m decoder, m ≤ 2n
■ Examples: BCD-to-7-segment decoder,
where n = 4 and m = 10
■ Enable input: it must be on (active) for the decoder to
function, otherwise its outputs assume a single
"disabled" output code word
Decoders (Cont.)
An 8-to-3 encoder
⮚ This is a valid bit indicator that is set to 1 when one or more inputs are equal
to 1. If all inputs are 0, there is no valid input and V is equal to 0.
⮚ The minterms for the two functions A and B are derived from the table as
A = Σ m(1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15)
B = Σ m(1, 3, 4, 5, 7, 9, 11, 12, 13, 15)