Professional Documents
Culture Documents
002
002
Test #2
With Answers
Name
1 July 2015
1. Show that x = xy + xy
=>
x y F
0 0 0
0 1 0
1 0 1
1 1 1
x = xy + xy
x = x(y + y)
x = x(1)
x=x
(1)
1
2. Is the following distributive law valid or invalid? Prove your answer.
x ⊕ (yz) = (x ⊕ y)(x ⊕ z)
2
3. Use any method to prove the following either true or false:
yz + xyz + xyz = xy + xz
=>
yz + xyz + xyz = xy + xz
yz(x + x) + xyz + xyz = xy(z + z) + xz(y + y)
xyz + xyz + xyz + xyz = xyz + xyz + xyz + xyz
xyz + xyz + xyz + xyz = xyz + xyz + xyz + xyz
(2)
3
4. The truth table for a Boolean expression is shown below. Write the
Boolean expression in sum-of-products form.
x y z F
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
4
5. Tyrone Shoelaces has invested a huge amount of money into the stock
market and doesnt trust just anyone to give him buying and selling
information. Before he will buy a certain stock, he must get input from three
sources. His first source is Pain Webster, a famous stock broker. His second
source is Meg A. Cash, a self-made millionaire in the stock market, and his
third source is Madame LaZora, a world-famous psychic. After several months
of receiving advice from all three, he has come to the following conclusions:
• Buy if Pain and Meg both say yes and the psychic says no.
Construct a truth table and find the minimized Boolean function to implement
the logic telling Tyrone when to buy. =>
5
6. Create the Kmaps and then simplify for the following functions:
=>
yz
00 01 11 10
00 1 1
01 1 1 1
wx
11
10 1 1
F (w, x, y, z) = x + wxz + wyz
yz
00 01 11 10
00 1 1
01
wx
11
10 1 1 1
F (w, x, y, z) = xy + wxz
6
7. What does the following machine code do?? And what is the output.
=> Reads two characters from input (console or file). Prints the two
characters out in reverse order. Based on page 179.
7
8. Determine the output of the following Pep/8 machine-language program.
The left column is the memory address of the first byte on the line:
8
1 Necessary tables
References
[1] Linda Null and Julia Lobur, The Essentials of Computer Organization and
Architecture, Jones & Bartlett Publishers, 2010.
[2] J. Stanley Warford, Computer systems, Jones & Bartlett Publishers, 2010.
9
Figure 1: Pep/8 Machine codes from [2].
10
Figure 2: Pep/8 addressing modes from [2].
11
Figure 3: The ASCII table.
12
Figure 4: Boolean identities from [1].
13