Digital Electronics: Engs 31 / Cosc 56
Digital Electronics: Engs 31 / Cosc 56
DIGITAL ELECTRONICS
Day 5
Today: Tomorrow:
Minimizing logic (§6.2), Storing Bits Karnaugh Maps
5.1
Housekeeping
Homework 0 due now (bring it up to the front)
Homework Grading
4.2
Decoders, Multiplexers, and Encoders, revisited
0
n=0,1,…N–1 1
… N-1
A0
A1 Y
…
AN-1 SEL
n
…
4.3
Some things simplify, others don’t
Why does
X Y X’Y+ X’Y’
X’Y + X’Y’ simplify, 0 0 1
X’Y + X’Y’ = X’(Y+Y’) = 0 1 1
X’ 1 0 0
1 1 0
X Y X’Y+ XY’
0 0 0
but 0 1 1
X’Y + XY’ = X Y does not 1 0 1
simplify? 1 1 0
5.4
Basic simplification mechanism
X Y X’Y+ X’Y’
0 0 1
Y is both 0 and 1 while X is 0. { 0 1 1
“Logical adjacency” 1 0 0
1 1 0
X Y X’Y+ XY’
0 0 0
0 1 1
Doesn’t happen here { 1 0 1
1 1 0
The truth set of a logical function is the set of input vectors which
make the function true. A logical function can be simplified if
elements of its truth set are logically adjacent.
5.6
Karnaugh maps: graphical Boolean algebra
Display logical adjacency pictorially.
X´Y + XY = Y
Each cell represents a row of the truth table. Physically adjacent cells
(horizontal or vertical, not diagonal) are logically adjacent.
5.7
3-variable Karnaugh maps
Simplifications occur in groups of two or four.
5.8
4-variable Karnaugh maps
Simplifications occur in groups of two, four, or eight
5.9
Example: BCD
Let x = 0.
Minimize y0
4.10
More definitions
A minterm is a Boolean expression that covers only one cell of a
Karnaugh map. For example, on a two-variable map,
m0 = X’Y’, m1 = X’Y, m2 = XY’, m3 = XY
5.11
Overlapping coverings are OK
The best coverings use the largest groups.
A prime implicant is a circled group of 1-cells that can’t be made any
larger by circling adjacent cells.
5.12
A minimal SOP is a sum of prime implicants
X + Z’
5.13
Exclusive-OR patterns
No logical adjacency
5.14
Incompletely specified functions (don’t cares)
Example: Increment a binary-coded decimal (BCD) digit.
5.15
Logic minimization using don’t cares
5.16
CAD methods for logic minimization
By-hand Karnaugh minimization is virtually impossible for more than 5 or 6
variables.
5.17
Implementation: programmable logic device (PLD, CPLD)
AND gate inputs
programmed via this Sum of products
connection matrix. with wide OR gate
5.20
Karnaugh maps for POS forms
A maxterm is a Boolean expression that covers all but one cell of a
Karnaugh map. For example, on a three-variable map,
M0 = m0’ = (X’Y’Z’)’ = X + Y + Z (using DeMorgan)
M1 = m1’ = (X’Y’Z)’ = X + Y + Z’
f = S m(1, 2, 3, 4, 7) = (S m(0, 5, 6) )’
= P M(0, 5, 6)
= (X+Y+Z)(X’+Y+Z’)(X’+Y’+Z)
5.21
Example: a 3-variable function from last time
This logical function
Y = A’B + BC + AB’
Y = (A’ + B’ + C) • (A + B)
5.22
Example: On a Karnaugh map
BC
00 01 11 10
A
5.23
Implementing SOP or POS
An XOR gate is a programmable inverter
If P=0, Y=X
If P=1,
Y=X’
If you follow an AND-OR array with a programmable inverter,
you can implement SOP or POS. Some programmable logic
devices have this built-in. Suppose X = AB + C’D
If P=0,
Y = AB + C’D
If P=1,
Y = (A’+B’)(C+D’)
5.24
Alternate 7-segment decoder
Build NOT gates (low true) into truth table
g=
5.26
Back to electronics: review propagation delay
Example: 74LS00 Quad 2-input NAND gate
9.5 ns 15 ns
average worst case
6.27
Circuits with feedback
Because of timing delays, feedback can have interesting effects.
Ring oscillator
6.28
Basic two-state circuit
Feedback with NOR gates: Set-Reset (SR) latch
6.29
Fixing the SR latch
“Enable” input permits latching to be controlled, but S=R=1 ambiguity
remains.
6.30
Transparent D latch
6.31
Edge-triggered D flip-flop
Transparent latch responds to input while clock is high (level-sensitive).
D flip-flop
D latch D latch
D Q’
Dm Qm Ds Qs’
Q
Cm Cs Qs
master servant
Clk
Master-servant design illustrates concept, but is not a good design. See Katz,
§6.1.5, for a better one (and explanation).
Vahid, Fig 3.25
7.32
What can we do with flip-flops?
We can build systems with memory.
6.33