Chapter 6

The circuit for the four status flags is

Instead of selecting one output line like the decoder in Figure 68, a BCD to sevensegment decoder selects several of the seven output lines for each 4bit BCD input.
We start with a truth table that shows which segments are activated to display the numeral, 0 – 9, corresponding to the four x_{i} BCD bits.
Digit x_{3} x_{2} x_{1} x_{0} a b c d e f g 0 0
0
0
0
1
1
1
1
1
1
0
1 0
0
0
1
0
1
1
0
0
0
0
2 0
0
1
0
1
1
0
1
1
0
1
3 0
0
1
1
1
1
1
1
0
0
1
4 0
1
0
0
0
1
1
0
0
1
1
5 0
1
0
1
1
0
1
1
0
1
1
6 0
1
1
0
1
0
1
1
1
1
1
7 0
1
1
1
1
1
1
0
0
0
0
8 1
0
0
0
1
1
1
1
1
1
1
9 1
0
0
1
1
1
1
1
0
1
1
The 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) = x_{1} ∨ x_{3} ∨ (¬x_{0} ∧ ¬x_{2}) ∨ (x_{0} ∧ x_{2})
b(x) = ¬x_{2} ∨ (¬x_{0} ∧ ¬x_{1}) ∨ (x_{0} ∧ x_{1})
c(x) = x_{0} ∨ ¬x_{1} ∨ x_{2}
d(x) = x_{3} ∨ (¬x_{0} ∧ ¬x_{2}) ∨ (x_{1} ∧ ¬x_{2}) ∨ (¬x_{0} ∧ x_{1}) ∨ (x_{0} ∧ ¬x_{1} ∧ x_{2})
e(x) = (¬x_{0} ∧ ¬x_{2}) ∨ (¬x_{0} ∧ x_{1})
f(x) = x_{3} ∨ (¬x_{0} ∧ ¬x_{1}) ∨ (¬x_{0} ∧ x_{2}) ∨ (¬x_{1} ∧ x_{2})
g(x) = x_{3} ∨ (¬x_{0} ∧ x_{1}) ∨ (x_{1} ∧ ¬x_{2}) ∨ (¬x_{1} ∧ x_{2})
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.)
x_{1} x_{0} y_{1} y_{0} EQ GT LT 0
0
0
0
1
0
0
0
0
0
1
0
0
1
0
0
1
0
0
1
0
0
0
1
1
0
1
0
0
1
0
0
0
1
0
0
1
0
1
1
0
0
0
1
1
0
0
1
0
0
1
1
1
0
1
0
1
0
0
0
0
0
1
1
0
0
1
0
0
1
1
0
1
0
1
0
0
1
0
1
1
0
0
1
1
1
0
0
0
0
1
1
1
0
1
0
0
1
1
1
1
0
0
1
0
1
1
1
1
1
0
0
We can specify the connections in the PLD for our comparator directly from the truth table.