Your smartphone can be set to Do Not Disturb, for example at night. It rings audibly only if silent mode is off. Do Not Disturb silences incoming calls, with two exceptions: calls from your favourites, and a repeated call (German: wiederholter Anruf), when the same person calls again shortly after a first call. Silent mode has priority over both exceptions. The inputs and the output are:
A: silent mode is on
B: the caller is one of your favourites
C: Do Not Disturb is on
D: the call is a repeated call
Y: the ringtone is audible
a) Set up the truth table of Y.
b) Give the minterm list and the maxterm list of Y.
c) Minimize Y with a Karnaugh map, once with loops of ones and once with loops of zeros. Which of the two results needs fewer gates?
d) Draw the circuit of the result with fewer gates, according to the standard of the International Electrotechnical Commission (IEC), IEC 60617.
e) Without repeated calls, the circuit Yold=A⋅(B+C) fulfilled the description. Show with a counterexample that it does not fulfil the new description.
a) the truth table of Y
b) the minterm list and the maxterm list of Y
c) the minimized DNF and the minimized CNF of Y, and the one with fewer gates
d) the circuit of the result with fewer gates
e) a counterexample that shows that Yold does not fulfil the new description
a) Truth table
With silent mode on, the phone stays silent whatever the other inputs say: a 0 in rows 8 to 15. With silent mode off, it rings unless Do Not Disturb blocks the call. Do Not Disturb blocks a call only if it comes neither from a favourite nor repeatedly: Do Not Disturb on, not a favourite, not repeated – that is row 2. In all other rows with silent mode off, the phone rings: without Do Not Disturb in rows 0, 1, 4 and 5, with Do Not Disturb for a repeated call in row 3 and for a favourite in rows 6 and 7 (DET-03, 1.2):
Row
A
B
C
D
Y
0
0
0
0
0
1
1
0
0
0
1
1
2
0
0
1
0
0
3
0
0
1
1
1
4
0
1
0
0
1
5
0
1
0
1
1
6
0
1
1
0
1
7
0
1
1
1
1
8
1
0
0
0
0
9
1
0
0
1
0
10
1
0
1
0
0
11
1
0
1
1
0
12
1
1
0
0
0
13
1
1
0
1
0
14
1
1
1
0
0
15
1
1
1
1
0
Check by counting: half of the 16 rows have silent mode on. Of the eight others, only row 2 has a blocked call, so the table has 8−1=7 ones ✓
b) Minterm and maxterm lists
The minterm list names the seven rows with a 1, the maxterm list the nine rows with a 0 (DET-03, 2.5):
Check: together, the two lists contain each of the 16 row numbers exactly once ✓
c) Minimization with the Karnaugh map
With four inputs, the map has A on the left of the rows and D on the right of them, B above and C below the columns. Row by row, the cells contain the minterms 0, 2, 6 and 4; 1, 3, 7 and 5; 9, 11, 15 and 13; 8, 10, 14 and 12 (DET-03, 4.1). The ones lie in the two upper rows, the rows with A=0, except the cell of 2.
Loops of ones (figure): the seven ones form three loops of four (DET-03, 4.2):
the cells of 4, 5, 6 and 7, a square in the two right columns of the upper rows: A⋅B
the cells of 0, 1, 4 and 5 in the first and the last column of the upper rows, neighbours across the left and the right edge: A⋅C
the cells of 1, 3, 5 and 7, the whole second row: A⋅D
Y=A⋅B+A⋅C+A⋅D
Loops of zeros (figure): the lower half of the map, the eight cells with A=1, forms a loop of eight; there, A is 1, so the sum term is A. The remaining zero, in the cell of 2 at the top of the second column, has a neighbour across the top and the bottom edge: the zero in the cell of 10 at the bottom of the same column. In both, B is 0, C is 1 and D is 0, while A changes, so the sum term is B+C+D (DET-03, 4.3):
The CNF needs two gates with five gate inputs instead of four gates with nine; both forms need inverters for A and C. Read the CNF: the phone rings if silent mode is off and one of three things holds: the caller is a favourite, Do Not Disturb is off, or the call is repeated.
Check: factoring out A from the DNF gives the CNF:
A⋅B+A⋅C+A⋅D=A⋅(B+C+D)
✓
d) Circuit
The minimized CNF becomes a two-level circuit directly (DET-03, 5.1): an OR gate with three inputs forms the sum term B+C+D, and an AND gate combines it with A. The sum term A has a single literal and needs no OR gate; it comes directly from an inverter. A second inverter provides C (figure). As in the lesson, the intermediate node at the output of the OR gate is called X:
XY=B+C+D=A⋅X=A⋅(B+C+D)
Check in row 2, the only row with silent mode off in which the phone stays silent. For A=0, B=0, C=1 and D=0:
XY=B+C+D=0+1+0=0=A⋅X=0⋅0=0
✓
e) Counterexample
Yold does not contain D; it treats a repeated call like any other call. A difference can therefore only occur where a repeated call matters: silent mode off, Do Not Disturb on, the caller not a favourite and the call repeated. This is row 3 (DET-03, 5.3). For A=0, B=0, C=1 and D=1:
The description demands a 1: the same person calls again shortly after a first call, and Do Not Disturb lets the call through. The old circuit delivers a 0, and the phone stays silent. Row 3 is a counterexample, so Yold does not fulfil the new description.
Check with the minterm lists: the old circuit is 1 where silent mode is off and either the caller is a favourite or Do Not Disturb is off, whatever D is:
Yold(A,B,C,D)=∑m(0,1,4,5,6,7)
The minterm list of Y from b) contains row 3 as well; apart from it, the two lists agree ✓
The simulation shows both circuits, driven by the same four inputs: the new one with the output Y above, the old one with the output Yold below. It starts in row 3, the counterexample: Y shows 1 and Yold shows 0. Switch the inputs through all 16 rows: the two outputs differ only in row 3.