Midterm

ECE 200

1 hour

NAME______


Midterm solution

ECE 200

1.

a) 5 points

Convert 21023 to base 9 without going through base 10. Show your method.

32 = 9, thus can group by 2’s:

21 = 2*3 + 1*1 = 7

02 = 0*3 + 2*1 = 2

Thus 21023 =729.

b) 5 points

On the planet Multiplex, there are two species, one, the Karnaughs with 16 fingers, a the other, the Wakerlys, with 13 fingers. Each prefers the base which is equal to their finger count. Convert 129 to the system used by both species (use extra letters as in hexadecimal, if necessary).

KarnaughWakerlys

129/16 = 8 r1129/13 = 9r12(C)

8/16 = 0r89/13 = 0r9

Thus Thus

129 = 8116129 = 9C13

c) 5 points

Multiplex has an advanced civilization with binary based computers, like ours. The species are fighting over which number system to use. Which one do you think they should adopt, and why (one sentence).

They should adopt the Karnaugh system, which can easily represent binary numbers (4 binary numbers equal 1 hex number), and in addition, 16 is more divisible than 13. [Binary is a cumbersome system for non-machines because of the large number of digits; base 12 is good but doesn’t correspond to the native system of either species.]

2.

Perform the following calculations in two’s-complement using 1 byte. Indicate all overflows.

a) 5 points

00100011 = 35

11001010 = -54

------

11101101 = -19no overflow

b) 5 points

01100100 = 100

00110010 = 50

------

10010110 = xxxoverflow (1st column doesn’t match)

c) 5 points

-100 - 50

10011100 = -100

11001110 = -50

------

01001010 = xxxoverflow (1st column doesn’t match)

3.

a) 5 points

Prove the following theorem with a truth table:

(X + (X + Y))’ = X’Y’

XYX+Y(X + (X + Y))(X + (X + Y))’X’Y’

000011

011100

101100

111100

columns match so two sides are equivalent

b) 10 points

Prove the theorem by simplification.

(X + (X + Y))’ =

= ((X + X) + Y)’associativity

= (X + Y)’idempotency

= X’Y’DeMorgan

(can also apply DeMorgan first and then simplify)

c) 5 points

What is the dual of this theorem? Is it true (give the shortest justification of your conclusion)?

replacing + with ·

(X · (X · Y))’ = X’ + Y’

The shortest justification:

If a theorem is true, it’s dual is also true.

4.

Show that the circuit in (A) is equivalent to the circuit in (B) using the same method we used to derive the equivalence of a sum of products circuit with one using only NAND gates. Note that the rightmost gate, which represents exclusive OR, does not change in this case.

(A) is equivalent by double negation to:

But this is equivalent to (B) because negating the two inputs to XOR does not change the truth table, as can be seen by the equivalence of the bold columns:

XYX XOR YX’Y’X’ XOR Y’

00 011 0

01 110 1

10 101 1

11 011 0

5. 10 points

Draw a circuit that realizes the following function (there is no need to minimize the circuit).

F = (X + (YZ)’)(XYZ + W’X + Z)


6.

a) 5 points

A three variable function is true if and only if the number represented by the variables is evenly divisible by 3 (0 is evenly divisible by 3). Show the truth table for this function.

XYZF

00001

10010

20100

30111

41000

51010

61101

71110

b) 10 points

Draw a circuit representing this function using only NAND gates and inverters.

The sum of products representation is:

X,Y,Z(0,3,6) = X’Y’Z’ + X’YZ + XYZ’

The NAND circuit for this function is:

c) 10 points

Draw a circuit representing this function using only NOR gates and inverters.

The product of sums representation is:

X,Y,Z(1,2,4,5,7) =

(X + Y + Z’)(X + Y’ + Z)(X’ + Y + Z)(X’ + Y + Z’)(X’ + Y’ + Z’)

The NOR circuit for this function is: