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)

F(A,B,C,D) A'B' A'B AB AB'
C'D' 1 1 1 1
C'D 1 1 1 1
CD 1 1 1 1
CD' 1 1 1 1
F (A, B, C, D) = 1

 

F(A,B,C,D) A'B' A'B AB AB'
C'D' 0 1 0 1
C'D 1 1 1 0
CD 1 0 1 1
CD' 1 1 1 0
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

 

F(A,B,C,D) A'B' A'B AB AB'
C'D' 1 0 1 0
C'D 0 1 0 1
CD 1 0 1 0
CD' 0 1 0 1
F (A, B, C, D) = A XOR B XOR C XOR D

8 essential prime implicants

 

F(A,B,C,D) A'B' A'B AB AB'
C'D' 0 0 0 0
C'D 0 0 0 0
CD 0 0 0 0
CD' 0 0 0 0
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.

 

A B C D A'+C+D A+B+C'+D' A'+B'+C'+D' S
0 0 0 0 1 1 1 1
0 0 0 1 1 1 1 1
0 0 1 0 1 1 1 1
0 0 1 1 1 0 1 0
0 1 0 0 1 1 1 1
0 1 0 1 1 1 1 1
0 1 1 0 1 1 1 1
0 1 1 1 1 1 1 1
1 0 0 0 0 1 1 0
1 0 0 1 1 1 1 1
1 0 1 0 1 1 1 1
1 0 1 1 1 1 1 1
1 1 0 0 0 1 1 0
1 1 0 1 1 1 1 1
1 1 1 0 1 1 1 1
1 1 1 1 1 1 0 0
A B C D A'C' BC'D T
0 0 0 0 1 0 1
0 0 0 1 1 0 1
0 0 1 0 0 0 0
0 0 1 1 0 0 0
0 1 0 0 1 0 1
0 1 0 1 1 1 1
0 1 1 0 0 0 0
0 1 1 1 0 0 0
1 0 0 0 0 0 0
1 0 0 1 0 0 0
1 0 1 0 0 0 0
1 0 1 1 0 0 0
1 1 0 0 0 0 0
1 1 0 1 0 1 1
1 1 1 0 0 0 0
1 1 1 1 0 0 0
S(A, B, C, D) A'B' A'B AB AB'
C'D' 1 1 0 0
C'D 1 1 1 1
CD 0 1 0 1
CD' 1 1 1 1
T(A, B, C, D) A'B' A'B AB AB'
C'D' 1 1 0 0
C'D 1 1 1 0
CD 0 0 0 0
CD' 0 0 0 0
f(A,B,C,D) A'B' A'B AB AB'
C'D' 1 1 X X
C'D 1 1 1 0
CD X 0 X 0
CD' 0 0 0 0
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.
f(A,B,C, D) A'B' A'B AB AB'
C'D' 1 1 X X
C'D 1 1 1 0
CD X 0 X 0
CD' 0 0 0 0
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)

A1 A0 B1 B0 G E L
0 0 0 0 0 1 0
0 0 0 1 0 0 1
0 0 1 0 0 0 1
0 0 1 1 0 0 1
0 1 0 0 1 0 0
0 1 0 1 0 1 0
0 1 1 0 0 0 1
0 1 1 1 0 0 1
1 0 0 0 1 0 0
1 0 0 1 1 0 0
1 0 1 0 0 1 0
1 0 1 1 0 0 1
1 1 0 0 1 0 0
1 1 0 1 1 0 0
1 1 1 0 1 0 0
1 1 1 1 0 1 0

G = A1B1' + A0B1'B0' + A1A0B0'
E = A1'A0'B1'B0' + A1'A0B1'B0 + A1A0B1B0 + A1A0'B1B0'
L =A1'B1 + A0'B1B0 + A1'A0'B0 

G A1'A0' A1'A0 A1A0 A1A0'
B1'B0' 0 1 1 1
B1'B0 0 0 1 1
B1B0 0 0 0 0
B1B0' 0 0 1 0
E A1'A0' A1'A0 A1A0 A1A0'
B1'B0' 1 0 0 0
B1'B0 0 1 0 0
B1B0 0 0 1 0
B1B0' 0 0 0 1
L A1'A0' A1'A0 A1A0 A1A0'
B1'B0' 0 0 0 0
B1'B0 1 0 0 0
B1B0 1 1 0 1
B1B0' 1 1 0 0

 

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:

 
A1 A0 B1 B0 Y0 Y1
0 0 0 0 0 1
0 0 0 1 0 0
0 0 1 0 0 0
0 0 1 1 0 0
0 1 0 0 1 0
0 1 0 1 0 1
0 1 1 0 0 0
0 1 1 1 0 0
1 0 0 0 1 0
1 0 0 1 1 0
1 0 1 0 0 1
1 0 1 1 0 0
1 1 0 0 1 0
1 1 0 1 1 0
1 1 1 0 1 0
1 1 1 1 0 1

Y0 = A1B1' + A0B1'B0' + A1A0B0'
Y1 = A1'A0'B1'B0' + A1'A0B1'B0 + A1A0B1B0 + A1A0'B1B0'

Y0 A1'A0' A1'A0 A1A0 A1A0'
B1'B0' 0 1 1 1
B1'B0 0 0 1 1
B1B0 0 0 0 0
B1B0' 0 0 1 0
Y1 A1'A0' A1'A0 A1A0 A1A0'
B1'B0' 1 0 0 0
B1'B0 0 1 0 0
B1B0 0 0 1 0
B1B0' 0 0 0 1
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:

H0 H1 L0 L1 G E L
0 0 0 0 0 0 1
0 0 0 1 0 0 1
0 0 1 0 0 0 1
0 0 1 1 X X X
0 1 0 0 0 0 1
0 1 0 1 0 1 0
0 1 1 0 1 0 0
0 1 1 1 X X X
1 0 0 0 1 0 0
1 0 0 1 1 0 0
1 0 1 0 1 0 0
1 0 1 1 X X X
1 1 0 0 X X X
1 1 0 1 X X X
1 1 1 0 X X X
1 1 1 1 X X X

G = H0 + H1L0
E = H1L1
L = H0'H1' + H0'L0'L1'

G H0'H1' H0'H1 H0H1 H0H1'
L0'L1' 0 0 X 1
L0'L1 0 0 X 1
L0L1 X X X X
L0L1' 0 1 X 1
E H0'H1' H0'H1 H0H1 H0H1'
L0'L1' 0 0 X 0
L0'L1 0 1 X 0
L0L1 X X X X
L0L1' 0 0 X 0
L H0'H1' H0'H1 H0H1 H0H1'
L0'L1' 1 1 X 0
L0'L1 1 0 X 0
L0L1 X X X X
L0L1' 1 0 X 0

 

A0 B0 I0 I1 Y0 Y1
0 0 0 0 0 0
0 0 0 1 0 1
0 0 1 0 1 0
0 0 1 1 X X
0 1 0 0 0 0
0 1 0 1 0 0
0 1 1 0 1 0
0 1 1 1 X X
1 0 0 0 0 0
1 0 0 1 1 0
1 0 1 0 1 0
1 0 1 1 X X
1 1 0 0 0 0
1 1 0 1 0 1
1 1 1 0 1 0
1 1 1 1 X X
Y0 A0'B0' A0'B0 A0B0 A0B0'
I0'I1' 0 0 0 0
I0'I1 0 0 0 1
I0I1 X X X X
I0I1' 1 1 1 1
Y1 A0'B0' A0'B0 A0B0 A0B0'
I0'I1' 0 0 0 0
I0'I1 1 0 1 0
I0I1 X X X X
I0I1' 0 0 0 0
Y0 = I0 + A0B0'I1
Y1 = A0'B0'I1 + A0B0I1

 

Here are the truth table, K-maps, and circuit diagram for the final block:

I0 I1 G E L
0 0 0 0 1
0 1 0 1 0
1 0 1 0 0
1 1 X X X
G I0' I0
I1' 0 1
I1 0 X
E I0' I0
I1' 0 0
I1 1 X
L I0' I0
I1' 1 0
I1 0 X
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