Practice Spring 2021 Midterm
Practice Spring 2021 Midterm
4) Use the recipe for designing combinational circuits to develop a circuit that determines whether a 3-
bit signed integer N satisfies the equation: (N3 + 5N2 – 1) mod 3 = 0.
a) Draw a “black box” diagram for the circuit that
b) Formalize the informal semantics of this circuit with a truth table.
c) Construct the boolean clause corresponding to the truth table.
d) Draw the circuit corresponding to the boolean formula.
5) For each row in the following table, determine whether the specified relation for the given
interpretation of A and B would hold after N-bit subtraction ( A – B ), assuming the subtraction
produced in the indicated condition flag values.
flags interpretation relation T/F
ZNCV unsigned A < B
ZNCV unsigned A > B
ZNCV unsigned A = B
ZNCV unsigned A < B
ZNCV unsigned A > B
ZNCV unsigned A ≥ B
ZNCV unsigned A ≥ B
ZNCV unsigned A ≤ B
ZNCV unsigned A > B
6) Short answer:
a. What is the smallest number that can be represented as a signed 10-bit integer?
b. What is the primary difference between combinational and sequential circuits?
c. Give a formula for the two’s complement of an signed 6-bit integer N.
d. Convert 0b10110010101100110110111010010110101111 to hexadecimal.
e. Give an example of De Morgan’s Law.
f. How many distinct values can be represented (under any interpretation) with 12 bits?
g. What does the acronym ISA stand for?
h. Under what conditions does the signed n-bit sum S of two n-bit numbers X and Y result in
overflow?
i. If the value of the unsigned interpretation of an 8-bit number is 167 (128 + 39), what is the value
of the same number under the signed interpretation?
j. What does a multiplexer circuit do?