CSE 370, Spring 2000
Homework 4 Solutions
NOTE: Leaving a question worth 0 points blank resulted in a 1 point deduction from your homework score.
1. Implicants (4 points)
a) (1 point) What is the maximum number of implicants? Give a minimized Boolean expression for a function that achieves this maximum.
Since an implicant is any circle we can draw in a K-map, this question is almost trivial because the function F (A, B, C, D) = 1 will give us the most number of implicants (I can count 81 distinct implicants in this function... can you find more? Can you prove there are no more?)
|
F (A, B, C, D) = 1 |
b) (1 point) What is the maximum number of prime implicants? Give a minimized Boolean expression for a function that achieves this maximum.
|
F (A, B, C, D) = AB'C'D' +
A'B(D' + C') + A'B'(C + D) + AB(C + D) + (A' + B)C'D + (A + B')CD + (A' + B)C D' 13 prime implicants |
c) (1 point) What is the maximum number of essential prime implicants? Give a minimized Boolean expression for a function that achieves this maximum.
|
F (A, B, C, D) = A XOR B
XOR C XOR D
8 essential prime implicants |
d) (1 point) What is the minimum number of essential prime implicants? Give a minimized Boolean expression for a function that achieves this minimum.
|
F (A, B, C, D) = 0
0 essential prime implicants |
2. Boolean Equations (4 points)
Exactly as one can define a real variable by an equation which needs to be solved for the given variable (for example 2x 2 + x - 2 = 0), one can also define a Boolean function by giving an equation which needs to be solved for the unknown Boolean function. For example, if S and T are given Boolean expressions, one might define the Boolean function f by requiring that S.f = T. Note that, exactly as in the real number case, there might be more than one distinct Boolean function f that solves the equation (two solutions are said to be distinct if one cannot be derived from the other using Boolean algebra).
Let S = (A’ + C + D)(A + B + C’ + D’)(A’ + B’ + C’ + D’) and T = A’C’ + BC’D. Give an expression for one possible Boolean function f that satisfies the equation S.f = T. Also give the truth table for this Boolean function, with the variables from left to right being A, B, C, D. How many distinct solutions for f are there in this case? Explain.
We are given the function S, and the result of (S AND f) is T. Let's look at the truth tables for these functions, and make their K-maps:
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
Firstly, Where T is 1 we put a 1 in f's K-map to ensure that the result of (S AND F) will be 1. Then, where ever S was 0, we made a "don't care" case in the K-map. This makes sense because we know S is 0, and (0 AND f) will be 0 too. We then put 0's in the rest of the K-map (these are locations where S is 1), so (S AND 0) will give us 0 back. Hopefully it is clear that when this K-map is "ANDed" with the K-map for S, the resulting K-map will be T. |
|
There are 2
circles shown here, each containing 4 terms. The SOP expression for
this function is:
f(A, B, C, D) = A'C' + BC' = C'(A' + B) |
3. Comparator (design problem, 12 points)
a) (0 points) The 2-bit comparator is described by the following truth table, K-maps, and circuit:
|
G = A1B1' + A0B1'B0' + A1A0B0' |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
The 4 bit numbers are both split into high order and low order bit pairs, and then each of these pairs is compared separately. The outputs from both blocks are then routed directly to the 6 inputs of the new block in the diagram. This new block should behave as described by the following C++ style code segment:
if ( G1 || ( E1 && G0 ) ) { G = 1; E = 0; L = 0; }
if ( E1 && E0 ) { G = 0; E = 1; L = 0; }
if ( L1 || ( E1 && L0 ) ) { G = 0; E = 0; L = 1; }To put it in English, if G1 is high OR E1 AND G0 are high, then G should be 1; if E1 AND E0 are both high, then E should be 1; if L1 is high OR E1 AND L0 are high, then L should be 1. We can actually map this directly to gates now:
|
Y0 = A1B1' + A0B1'B0' + A1A0B0' |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Notice that Y0 and Y1 are analogous to G and E in the previous section of this problem. |
Now that we've decreased the number of inputs to the new block to 4, we can easily do a truth table, K-maps, and derive a circuit for the block. This is shown below:
|
G = H0 + H1L0 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Y0 = I0 + A0B0'I1 Y1 = A0'B0'I1 + A0B0I1 |
Here are the truth table, K-maps, and circuit diagram for the final block:
|
||||||||||||||||||||||||||||||
|
|
|
G = I0I1' E = I0'I1 L = I0'I1' |
4-bit comparator from section | gate count | propagation delay* |
d) | 36 | 6 * D |
f) | 33 | 14 * D |
* Propagation delays are calculated by assuming the delay through one gate is D, and then finding the worst case delay (i.e. longest path from input to output) for each circuit.
Created by: Valdis Riekstins
last updated: 4/25/00