Assignment 5 (Assigned September 3)



1. Give a truth table for each of the following logic expressions:
        a.) X (X+Y)
        b.) X + X Y

2. Derive a truth table having three inputs X, Y, C, and one output, Z, such that Z equals X if C
    is 0 and Z equals Y if C is 1.

3. Derive a truth table having four inputs and one output such that the output is a 1 if and only if the
    number of 1s in the inputs is odd.

4. Give a truth table that will take as input a 4-bit binary number and will give as output a 1 if the
    input value represents a prime. Otherwise, the output value is to be a 0. Assume 0 and 1 are
    not prime.

5. Derive the canonical sum-of-products expression corresponding to each truth table below. You will
    have one expression for each table.
 
a.)
A
B
Z
b.)
A
B
C
Z
c.)
A
B
C
D
Z
 
0
0
1
 
0
0
0
0
 
0
0
0
0
0
 
0
1
0
 
0
0
1
0
 
0
0
0
1
1
 
1
0
0
 
0
1
0
0
 
0
0
1
0
1
 
1
1
1
 
0
1
1
1
 
0
0
1
1
0
         
1
0
0
0
 
0
1
0
0
1
         
1
0
1
1
 
0
1
0
1
0
         
1
1
0
1
 
0
1
1
0
0
         
1
1
1
0
 
0
1
1
1
0
                   
1
0
0
0
1
                   
1
0
0
1
0
                   
1
0
1
0
0
                   
1
0
1
1
0
                   
1
1
0
0
0
                   
1
1
0
1
0
                   
1
1
1
0
0
                   
1
1
1
1
0

6. Give the canonical sum-of-products expression for the turth table of Problem 2.

7. Give the canonical sum-of-products expression for the truth table of Problem 3.

8. Give the canonical sum-of-products expression for the truth table of Problem 4.