No aids permitted, but there is a list of algebraic identities attached.
Time allotted: about 40 or 50 minutes
(but it might be a bit longer than the list of questions below, I think)
(Something like this note will appear on the midterm cover:)
Since time is short, be careful not to get stuck on one question to the
exclusion of others.
Not everyone will necessarily be able to finish this test within the ?? minutes.
The amount of marks or answer-space allotted does not indicate how
long it will take you to complete the question nor the size of the correct
answer.
(The answer space doesn't appear below, obviously.)
1. Simplify x+x++ xz algebraically (not using truth tables).
Answer:
x+x++xz
= x++xz
= x+xz+
= x+
2. What is the output sequence of the following "counter", after it gets established in its cycle?
Answer: 1, 2, 3, 1, 2, 3, ...
(or any other equivalent sequence, since it is infinite in both directions; e.g. 2, 3, 1, 2, 3, 1, ...)
(of course you can write the numbers in binary instead, and indeed you might find that more natural: 01, 10, 11, 01, 10, 11, ...)
3. As an eight-bit binary number, 12 is 00001100. As an eight-bit binary number, 18 is 00010010. Show how we subtract 18-12 by adding the two's-complement of 12.
Answer:
Flip 00001100 and add 1, to get a representation of -12:
11110011 + 1 -------- 11110100Add 18 plus this -12 value:
00010010 11110100 -------- 00000110which is 6.
4. The hypothetical (and admittedly somewhat silly) XY flip-flop has the following truth table:
X | Y | Qn+1 |
---|---|---|
0 | 0 | |
0 | 1 | |
1 | 0 | 1 |
1 | 1 | 0 |
Just as we designed a circuit for the JK flip-flop based on a master-slave SR flip-flop, design a circuit for the XY flip-flop based on the JK flip-flop. Formulate expressions for J and K in terms of Qn, X, and Y, and draw a circuit. Recall that in the JK flip-flop, J is the "set" line.
(N.B. your expressions for J and K need not necessarily mention all of Qn, X, and Y.)
Answer:
J =
K = +Y
Detailed explanation of that question 4 answer (some of this might appear in your answer on a midterm, or not; the above would be worth the full marks):
We can augment the above table by deciding whether we want to "set", "reset" (clear), or "toggle":
X | Y | Qn+1 | action |
---|---|---|---|
0 | 0 | toggle | |
0 | 1 | toggle | |
1 | 0 | 1 | set |
1 | 1 | 0 | reset |
This, then, gives us desired values for J and K:
X | Y | Qn+1 | action | J | K |
---|---|---|---|---|---|
0 | 0 | toggle | 1 | 1 | |
0 | 1 | toggle | 1 | 1 | |
1 | 0 | 1 | set | 1 | 0 |
1 | 1 | 0 | reset | 0 | 1 |
And that leads to the above two equations, J = and K = +Y.