You are on page 1of 6

ALTINBAŞ UNIVERSITY

School Of Engineering and


Natural Sciences
Department of Computer Engineering
EE242 DIGITAL SYSTEMS SPRING 2021-2022
MIDTERM EXAM
Student: Miyrem Hyusein
ID:220502952
Date:29.05.2023
QUESTION 1 (60 Points)
A combinational circuit with four inputs (𝐴, 𝐵, 𝐶, 𝐷) and one output (𝑍) is designed as follows using
an 8:1 multiplexer.
Inputs 𝐴, 𝐵, 𝐶 are connected to the select lines 𝑆2, 𝑆1, 𝑆0 respectively. Multiplexer has the following
values connected to the data inputs:
𝐼0, 𝐼6 = 𝐷;
𝐼1, 𝐼3 = 1;
𝐼2, 𝐼5 = 0;
𝐼4, 𝐼7 = 𝐷’
a) Fill the truth table. (10 Points)
To fill in the truth table, we need to consider all possible combinations of inputs A, B, C, and
D and determine the corresponding output Z using the given values connected to the data
inputs. Since we have four inputs, there will be 2^4 = 16 possible combinations. Here's the
truth table:
A B C D S2 S1 S0 Z
0 0 0 0 0 0 0 1
0 0 0 1 0 0 0 1
0 0 1 0 1 1 1 0
0 0 1 1 1 1 1 0
0 1 0 0 0 0 0 1
0 1 0 1 0 0 0 1
0 1 1 0 1 1 1 0
0 1 1 1 1 1 1 0
1 0 0 0 1 1 0 1
1 0 0 1 1 1 0 1
1 0 1 0 1 1 1 0
1 0 1 1 1 1 1 0
1 1 0 0 1 1 0 1
1 1 0 1 1 1 0 1
1 1 1 0 1 1 1 0
1 1 1 1 1 1 1 0

Inputs 𝐴, 𝐵, 𝐶 are connected to the select lines 𝑆2, 𝑆1, 𝑆0 respectively. The multiplexer has the
following values connected to the data inputs:
𝐼0, 𝐼6 = 𝐷;
𝐼1, 𝐼3 = 1;
𝐼2, 𝐼5 = 0;
𝐼4, 𝐼7 = 𝐷’

From the given conditions, we can determine the values for S2, S1, S0, and Z as follows:
For S2:
When A = 0, B = 0, C = 0, S2 should be 0 because 𝐼0 = 𝐷.
When A = 0, B = 0, C = 1, S2 should be 1 because 𝐼2 = 0.
When A = 0, B = 1, C = 0, S2 should be 0 because 𝐼0 = 𝐷.
When A = 0, B = 1, C = 1, S2 should be 1 because 𝐼2 = 0.
When A = 1, B = 0, C = 0, S2 should be 1 because 𝐼6 = 𝐷.
When A = 1, B = 0, C = 1, S2 should be 1 because 𝐼6 = 𝐷.
When A = 1, B = 1, C = 0, S2 should be 1 because 𝐼6 = 𝐷.
When A = 1, B = 1, C = 1, S2 should be 1 because 𝐼6 = 𝐷.
For S1 and S0, we can apply the same logic as above based on the given conditions.
For S1:
When A = 0, B = 0, C = 0, S1 should be 0 because 𝐼0 = 𝐷.
When A = 0, B = 0, C = 1, S1 should be 0 because 𝐼0 = 𝐷.
When A = 0, B = 1, C = 0, S1 should be 0 because 𝐼0 = 𝐷.
When A = 0, B = 1, C = 1, S1 should be 0 because 𝐼0 = 𝐷.
When A = 1, B = 0, C = 0, S1 should be 1 because 𝐼6 = 𝐷.
When A = 1, B = 0, C = 1, S1 should be 1 because 𝐼6 = 𝐷.
When A = 1, B = 1, C = 0, S1 should be 1 because 𝐼6 = 𝐷.
When A = 1, B = 1, C = 1, S1 should be 1 because 𝐼6 = 𝐷.
For S0:
When A = 0, B = 0, C = 0, S0 should be 0 because 𝐼0 = 𝐷.
When A = 0, B = 0, C = 1, S0 should be 1 because 𝐼2 = 0.
When A = 0, B = 1, C = 0, S0 should be 0 because 𝐼0 = 𝐷.
When A = 0, B = 1, C = 1, S0 should be 1 because 𝐼2 = 0.
When A = 1, B = 0, C = 0, S0 should be 0 because 𝐼0 = 𝐷.
When A = 1, B = 0, C = 1, S0 should be 0 because 𝐼0 = 𝐷.
When A = 1, B = 1, C = 0, S0 should be 1 because 𝐼2 = 0.
When A = 1, B = 1, C = 1, S0 should be 1 because 𝐼2 = 0.
For Z:
When A = 0, B = 0, C = 0, D = 0, Z should be 1 because 𝐼1 = 1.
When A = 0, B = 0, C = 0, D = 1, Z should be D = 1.
When A = 0, B = 0, C = 1, D = 0, Z should be 0 because 𝐼2 = 0.
When A = 0, B = 0, C = 1, D = 1, Z should be D' = 0.
When A = 0, B = 1, C = 0, D = 0, Z should be 1 because 𝐼1 = 1.
When A = 0, B = 1, C = 0, D = 1, Z should be D = 1.
When A = 0, B = 1, C = 1, D = 0, Z should be 0 because 𝐼2 = 0.
When A = 0, B = 1, C = 1, D = 1, Z should be D' = 0.
When A = 1, B = 0, C = 0, D = 0, Z should be 1 because 𝐼1 = 1.
When A = 1, B = 0, C = 0, D = 1, Z should be D = 1.
When A = 1, B = 0, C = 1, D = 0, Z should be 0 because 𝐼2 = 0.
When A = 1, B = 0, C = 1, D = 1, Z should be D' = 0.
When A = 1, B = 1, C = 0, D = 0, Z should be 1 because 𝐼3 = 1.
When A = 1, B = 1, C = 0, D = 1, Z should be D = 1.
When A = 1, B = 1, C = 1, D = 0, Z should be 0 because 𝐼5 = 0.
When A = 1, B = 1, C = 1, D = 1, Z should be D' = 0.

b) Reduce the output function as sum of minterms using Karnaugh map. (10 Points)
The Karnaugh map with variables A, B, C, and D is as follows:
CD
AB | 00 01 11 10
---+------------
00 | D 1
01 | D 1
11 | 1 D'
10 | 1 D'

c) Write the simplest logic expression of the circuit realized above 𝑍 = 𝑓 (𝐴, 𝐵, 𝐶, 𝐷). (10 Points)
Based on the given conditions for the 8:1 multiplexer, we have:
When S2 = 0, S1 = 0, S0 = 0: Z = D
When S2 = 0, S1 = 0, S0 = 1: Z = 1
When S2 = 0, S1 = 1, S0 = 0: Z = 0
When S2 = 0, S1 = 1, S0 = 1: Z = D'
When S2 = 1, S1 = 0, S0 = 0: Z = D
When S2 = 1, S1 = 0, S0 = 1: Z = 1
When S2 = 1, S1 = 1, S0 = 0: Z = 0
When S2 = 1, S1 = 1, S0 = 1: Z = D'
From the above conditions, we can observe that the output Z is dependent on the inputs A, B, C, and
D in different combinations. Let's simplify the logic expression based on these conditions:
Z = (A'BC'D) + (A'BCD') + (AB'C'D) + (AB'CD') + (ABC'D) + (ABCD') + (A'B'C'D') + (A'B'CD')
Therefore, the simplest logic expression for the circuit realized above is:
Z = A'BC'D + A'BCD' + AB'C'D + AB'CD' + ABC'D + ABCD' + A'B'C'D' + A'B'CD'
d) Use LTSpice to simulate the circuit. (30 Points)

QUESTION 2 (40 Points)


a) Using a decoder and external gates, design the combinational circuit defined by the following
three Boolean function. (20 Points)

Step 1: Obtain the truth tables for F1, F2, and F3:

F1 = x'y'z' + xy'

F2 = xy'z' + xz

F3 = x'y'z' + xy

Step 2: Simplify the Boolean expressions for F1, F2, and F3:

F1 = x'y'z' + xy' = y'(x'z' + x)

F2 = xy'z' + xz = x(y'z' + z)

F3 = x'y'z' + xy = y'(x'z' + x)

Step 3: Identify the inputs and outputs based on the simplified expressions: Inputs: x, y, z Outputs:
F1, F2, F3

Step 4: Design the circuit using a decoder and external gates:

Use a 3-to-8 decoder to decode the inputs x, y, and z into eight output lines (Y0, Y1, ..., Y7).

Connect the outputs of the decoder to appropriate external gates to implement the desired Boolean
functions F1, F2, and F3.

The circuit implementation would look like this:

x ---| |--- F1

y ---| |--- F2

z ---| |--- F3

| |

|3-to-8|

|decoder|

| |
In this circuit, the decoder generates the eight output lines based on the input combinations of x, y,
and z. The external gates then combine these output lines to realize the desired Boolean functions
F1, F2, and F3.

b) Use LTSpice to simulate the circuit. (20 Points)

𝐹1 = 𝑥′𝑦𝑧′ + 𝑥𝑦′
𝐹2 = 𝑥𝑦′𝑧′ + 𝑥𝑧
𝐹3 = 𝑥′𝑦′𝑧′ + 𝑥𝑦

You might also like