Professional Documents
Culture Documents
Part II
Question 1 /40
Question 2 /40
/100
Good Luck
Page 1 of 6
CSCI385 Sample Midterm Exam
Part I: MCQ
Question 1 [20 points]: Select the appropriate answer for each question.
a) xy
b) x+y
c) xy + x
d) x + y + z + xy
A) B) C) D)
X S X X S X
S S
Y Y Y Y
C C C C
5- The NAND gate output will be low if the two inputs are
a. 00
b. 01
c. 10
d. 11
Page 2 of 6
CSCI385 Sample Midterm Exam
Part II:
Question 1 [40 points]: Consider the following truth table where A, B, C, and D are considered as
inputs and F is the output. F is 1 when AB > CD, and 0 otherwise.
In other words, if A, B, C, D, are 1, 1, 0, 1 respectively, then AB is 11 and CD is 01. Since 11 (3 in
decimal) is greater than 01 (1 in decimal), then F is = 1.
We don’t care about the output when AB = CD.
Fill the truth table with the values of F.
A B C D F
0 0 0 0 x
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 x
0 1 1 0 0
0 1 1 1 0
1 0 0 0 1
1 0 0 1 1
1 0 1 0 x
1 0 1 1 0
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 x
F = AC’ + AD’
Page 3 of 6
CSCI385 Sample Midterm Exam
Page 4 of 6
CSCI385 Sample Midterm Exam
A B C D F
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 1 (m6)
0 1 1 1 1 (m7)
1 0 0 0 0
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 1 (m14)
1 1 1 1 1 (m15)
Page 5 of 6
CSCI385 Sample Midterm Exam
Page 6 of 6