Introduction to Computer Science:
Solution to Quiz 1
    Sewickley Academy, 2000-2001

See Course Home Page.

1.  Compute each of the following:

a.  1 or 0 = 1
b.  0 and 0 = 0
c.  0 nor 1 = 0 (because 0 or 1 is 1)
d.  1 and (0 nand 1) = 1 (because 0 and 1 is 0, hence 0 nand 1 is 1, and 1 and 1 is 1)
2.  Fill in the the truth tables for the following Boolean logical operators:
a.    x  xor  y
x   y  x  xor  y
0   0      0
0   1      1
1   0      1
1   1      0
b.    f  and  g
f   g  f  and  g
0   0      0
0   1      0
1   0      0
1   1      1
c.    m  nor  n
m   n  m nor n
0   0     1
0   1     0
1   0     0
1   1     0
3.  Prove the following (one of De Morgan's Laws):  x or y = ~( ~x and ~y )
Prove this is true by filling in the following truth table, and then noting that the columns for  x  or  y  and  ~ ( ~x  and  ~y ) are identical.
x   y  ~x~y   ~x and ~y  ~(~x and ~y) x or y
0   0   1   1        1           0         0
0   1   1   0        0           1         1
1   0   0   1        0           1         1
1   1   0   0        0           1         1
4.   Express the function (x nor ~w) in Disjunctive Normal Form.
Do so by first filling in the following truth table, including the conjuncts column.  Recall that conjuncts are "true row selectors".  Then construct a disjunct (an or) of all of the conjuncts.

x   w  ~w x or ~w  x nor ~w   conjuncts
0   0   1      1        0       -
0   1   0      0        1       ~x and w
1   0   1      1        0       -
1   1   0      1        0       -

DNF = ~x and w

5.  Draw circuit diagrams for x nor ~w in the following 3 ways:
a.  First, using one not and one nor gate:

b.  Now, using two not and one or gates (recall x nor ~w is the same as ~(x or ~w)):

c.  Finally, using and, or, and not gates, construct the circuit which implements the DNF for the function (which you determined in problem 4):

6.  True or False:
a.  Because nor is a logical basis, we know that we can construct the circuit for any Boolean logical function, no matter how complex, using only nor gates.  True

b.  The functions w nor w, z nand z, and b xor b are all unary, because they only take one variable as input. True

c.  These same functions, w nor w, z nand z, and b xor b, are all degenerate, because they ignore their inputs, always producing the same output.  False (consider that 0 nor 0 = 1 and 1 nor 1 = 0, so w nor w does not ignore its inputs, but rather does change depending on the value of its inputs).

d.  The typical Word document created by the typical Sewickley Academy student for the typical homework assignment would easily fit on a typical floppy disk.  True

See Course Home Page.