CPSC 3300 - Spring 2015 Homework 4 Due at class time on Monday, Feb. 16 1. Simplify the following Karnaugh maps for functions D, E, and F. D \ BC A \ 00 01 11 10 +----+----+----+----+ 0 | 1 | 0 | 0 | 1 | D = fn(A,B,C) = ____________________ +----+----+----+----+ 1 | 0 | 0 | 1 | 1 | +----+----+----+----+ E \ BC A \ 00 01 11 10 +----+----+----+----+ 0 | 1 | d | 0 | d | E = fn(A,B,C) = ____________________ +----+----+----+----+ 1 | d | 1 | 0 | 1 | +----+----+----+----+ F \ CD AB \ 00 01 11 10 +----+----+----+----+ 00 | 1 | 1 | 0 | 0 | F = fn(A,B,C) = ____________________ +----+----+----+----+ 01 | 1 | 0 | 0 | 0 | +----+----+----+----+ 11 | 1 | 0 | 0 | 1 | +----+----+----+----+ 10 | 1 | 1 | 0 | 1 | +----+----+----+----+ 2. To provide proper rounding for floating-point addition, three extra bits are included in right shifts of fractions: guard, round, and sticky. The least-significant of these, the sticky bit, stays one whenever a 1 bit is shifted through it. In designing the logic for a sticky bit, let the following truth table define the actions for R (reset) and I (input) on a D flip-flop. R I Q(t) | Q(t+1) ----------+-------- 0 0 0 | 0 0 0 1 | 1 0 1 0 | 1 0 1 1 | 1 1 d d | 0 Five rows are shown (using d = don't care in the last row). The last row expands to four rows when a complete enumeration is done. (a) Using a Karnaugh map for simplifying the expression, give the input to the D flip-flop in terms of R, I, and Q(t). (b) Draw the state diagram for the sticky bit logic from the table above. There is no separate output signal. 3. Consider a state machine with two inputs, R and I (reset and in), that, after a reset R, outputs a 1 on each second 1 that it receives on input I. Reset causes any count of previous and current I=1 inputs to be lost, and the counting of I=1 inputs starts in the subsequent clock cycle after the reset signal goes back to 0. That is, the state machine behaves like this input R: 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 input I: 0 1 0 1 1 1 1 0 1 0 1 1 1 1 1 1 0 1 1 1 1 1 output S: 0 0 0 1 0 1 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 (a) Give the state diagram. (There should be only two states.) (b) Give the state transition table with inputs R, I, current state Q(t), next state Q(t+1), and output S. (c) Give the simplified logic expressions for Q(t+1) and S. (d) Extend the state transition table with J and K columns and, using the JK excitation table, fill in the appropriate values for causing the required state transitions. (e) Give the simplified logic expressions for J and K.