Chapter 6
-
The circuit for the four status flags is
-
Instead of selecting one output line like the decoder in Figure 6-8, a BCD to seven-segment decoder selects several of the seven output lines for each 4-bit BCD input.
We start with a truth table that shows which segments are activated to display the numeral, 0 – 9, corresponding to the four xi BCD bits.
Digit x3 x2 x1 x0 a b c d e f g 0 000011111101 000101100002 001011011013 001111110014 010001100115 010110110116 011010111117 011111100008 100011111119 10011111011The functional relationship between the four inputs and each of the seven outputs can be expressed as a sum of minterms.
a(x) = ∑(0,2,3,5,6,7,8,9)
b(x) = ∑(0,1,2,3,4,7,8,9)
c(x) = ∑(0,1,3,4,5,6,7,8,9)
d(x) = ∑(0,2,3,5,6,8)
e(x) = ∑(0,2,6,8)
f(x) = ∑(0,4,5,6,8,9)
g(x) = ∑(2,3,4,5,6,8,9)We’ll use Karnaugh maps to simplify the functions for each of the seven segments.
a(x) = x1 ∨ x3 ∨ (¬x0 ∧ ¬x2) ∨ (x0 ∧ x2)
b(x) = ¬x2 ∨ (¬x0 ∧ ¬x1) ∨ (x0 ∧ x1)
c(x) = x0 ∨ ¬x1 ∨ x2
d(x) = x3 ∨ (¬x0 ∧ ¬x2) ∨ (x1 ∧ ¬x2) ∨ (¬x0 ∧ x1) ∨ (x0 ∧ ¬x1 ∧ x2)
e(x) = (¬x0 ∧ ¬x2) ∨ (¬x0 ∧ x1)
f(x) = x3 ∨ (¬x0 ∧ ¬x1) ∨ (¬x0 ∧ x2) ∨ (¬x1 ∧ x2)
g(x) = x3 ∨ (¬x0 ∧ x1) ∨ (x1 ∧ ¬x2) ∨ (¬x1 ∧ x2)
This leads to a circuit for our decoder.
-
abcd
-
ABCD
-
We start with a truth table that shows the relationship of x compared to y. (Remember that GT and LT refer to signed values.)
x1 x0 y1 y0 EQ GT LT 0000100000100100100100011010010001001011000110010011101010000011001001101010010110011100001110100111100101111100We can specify the connections in the PLD for our comparator directly from the truth table.