Lebanese International University School of Arts and Sciences - Department of Computer Science
Lebanese International University School of Arts and Sciences - Department of Computer Science
Part II
Question 1 /40
Question 2 /40
/100
Good Luck
Page 1 of 6
CSCI345 Midterm Exam Fall 2021- 2022
Part I: MCQ
Question 1 [20 points]: Select the appropriate answer for each question.
3- What is the minimum number of gates required to implement the Boolean function (X+YZ) if we
have to use only 2-input NOR gates?
a) 2
b) 3
c) 4
d) 6
a) S=0,C=0
b) S=0,C=1
c) S=1,C=0
d) S=1,C=1
Page 2 of 6
CSCI345 Midterm Exam Fall 2021- 2022
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 ABCD IS A POWER OF 2 OR 3.
In other words, if A, B, C, D, are 0001 = 1 = 20 OR 1001 = 9 = 32 CONSIDERING all powers of 2 and 3.
then F is = 1.
We don’t care about the minterms 0, 6 , 10, 12, and 14.
And F equals zero otherwise.
a) Fill the truth table with the values of F.
Page 3 of 6
CSCI345 Midterm Exam Fall 2021- 2022
Page 4 of 6
CSCI345 Midterm Exam Fall 2021- 2022
Question 2 [40 points]: Design a combinational circuit with three inputs, x, y, and z, and three outputs,
A, B, and C.
- When the binary input (xyz) is 0, 1, 2, or 3, the binary output (ABC) is equal to the input +1.
For example, if input (xyz) is 2, the binary output (ABC) is equal to 3.
- When the binary input (xyz) is 4, 5, 6, or 7, the binary output ABC is less than the input by 1.
For example, if input (xyz) is 5, the binary output (ABC) is equal to 4.
a) Write the truth table
Page 5 of 6
CSCI345 Midterm Exam Fall 2021- 2022
Page 6 of 6