Midterm

Midterm
ECE 200
1 hour
NAME __________________________________
1
4
2
5
3
6
sum1
sum2
total
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
Midterm
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).
Karnaugh
129/16 = 8
r
8/16 = 0
Thus
129 = 8116
1
r
8
Wakerlys
129/13 = 9
r
9/13 = 0
Thus
129 = 9C13
12(C)
r
9
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 = -19
no overflow
b) 5 points
01100100 = 100
00110010 = 50
-----------10010110 = xxx
overflow (1st column doesn’t match)
c) 5 points
-100 - 50
10011100 = -100
11001110 = -50
-----------01001010 = xxx
overflow (1st column doesn’t match)
3.
a) 5 points
Prove the following theorem with a truth table:
(X + (X + Y))’ = X’Y’
X
0
0
1
1
Y
0
1
0
1
X+Y
0
1
1
1
(X + (X + Y))
0
1
1
1
(X + (X + Y))’
1
0
0
0
X’Y’
1
0
0
0
columns match so two sides are equivalent
b) 10 points
Prove the theorem by simplification.
(X + (X + Y))’
=
= ((X + X) + Y)’
= (X + Y)’
= X’Y’
associativity
idempotency
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:
X
0
0
1
1
Y
0
1
0
1
X XOR Y
0
1
1
0
X’
1
1
0
1
Y’
1
0
1
1
X’ XOR Y’
0
1
1
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.
0
1
2
3
4
5
6
7
X
0
0
0
0
1
1
1
1
Y
0
0
1
1
0
0
1
1
Z
0
1
0
1
0
1
0
1
F
1
0
0
1
0
0
1
0
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: