You are on page 1of 6

CSCI385 Sample Midterm Exam

Lebanese International University


School of Arts and Sciences - Department of Computer Science

Course Name : Digital Logic Course Code : CSCI385


Date : Section :
Instructor : Time : 10:00- 11:00
Auditorium : Seat Number :

Number of pages :6 Allowed Time : 60 minutes


Documents : Not Allowed Calculators : Not Allowed

Problem# Grade Total Grade


Part I
Question 1 /20

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.

1- The function f(a,b,c) =a’b + ab’c’ is equivalent to:


a) ∑m(2,3,4)
b) ∑m(2,3,5)
c) ∑m(1,2,5)
d) ∑m(1,5)

2- In a half adder, the sum can be expressed as:

a) xy
b) x+y
c) xy + x
d) x + y + z + xy

3- 1. The logic diagram of a Half-Adder has a view:

A) B) C) D)

X S X X S X
S S
Y Y Y Y

C C C C

4- The following diagram is the function of:


a. NAND
b. XOR A
c. X-NOR
d. OR B

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

a) Minimize F using a k-map.

F = AC’ + AD’

Page 3 of 6
CSCI385 Sample Midterm Exam

b) Draw the simplified function using digital logic gates.

c) Draw the simplified function using NAND gates only.

Page 4 of 6
CSCI385 Sample Midterm Exam

Question 2 [40 points]: Given the following Boolean function:


F (A, B, C, D) = A B C+ B C D' + A'B C

a) Express the function F into the sum of minterms.

F = A B C (D + D') + B C D' (A + A') + A'B C (D + D')

F = A B C D + A B C D' + A B C D' + A' B C D' + A'B C D + A'B C D'

F = m15 + m14 + m14 + m6 + m7 + m6

F (A, B, C, D) = ∑ (6, 7, 14, 15)

b) Write the truth table for F.

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)

c) Simplify F using Karnaugh map.

Page 5 of 6
CSCI385 Sample Midterm Exam

d) Realize the simplified function using NAND gates only.

Page 6 of 6

You might also like