CPSC 3300 - Fall 2015
Homework 4
Due at class time on Wednesday, Sept. 23
Each student must turn in a separate set of homework solutions, but
you may work together in study groups with other students from the
class. Include the names of your study group members on the solution
set you submit.
1. 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.
2. 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.