Mid-Term (Apr. 2023) - Solution
Mid-Term (Apr. 2023) - Solution
Iman Ahmed
Information Technology Department Four pages - 60 minutes
IT212-SIT213-CS221 Logic Design 1 April 2023
1 1 1 1
0 0 11 . 0 1 0 1 0 0 1 1
0 0 0 1 0 1 00 . 1 0 0 0
1
0 0 0 1 1 0 00 . 1 1 0 1 0 0 1 1
(0.25) (0.5) + 0 1 1 0 (0.25)
0 0 1 1
(0.5) for the initial
addition result and
(0.5) for the result
after addition 6
2. Having the Boolean function 𝐹𝐹(𝑊𝑊, 𝑋𝑋, 𝑌𝑌, 𝑍𝑍) = 𝑊𝑊𝑊𝑊 + 𝑋𝑋𝑋𝑋 + 𝑌𝑌𝑌𝑌 + 𝑊𝑊 𝑋𝑋 𝑌𝑌� + 𝑑𝑑(𝑊𝑊 𝑋𝑋 𝑌𝑌�)
a. Get the minterms of F [2.5 marks] F (W,X,Y,Z)= ( 3,4,5,6,7,11,12,13,14,15)
Each correct minterms earns + 0.25, each added uncorrect minterms earns -0.25
c. Get the simplified F as SoP (using another k-map) [1 mark] F (W,X,Y,Z)= X+YZ
Each correct term earns + 0.5, each added uncorrect term earns -0.25
Using PoS, we need two 2-input OR gate + one 2-input AND gate.
Using SoP, we need one 2-input AND + one 2-input OR gate.
As SoP needs less gates than PoS, so it is better to use SoP
YZ YZ
WX 00 01 11 10 WX 00 01 11 10
00 x x 1 00 x x 0
01 1 1 1 1 01
11 1 1 1 1 11
10 1 10 0 0 0
Propagation delay of
the circuit = 43 nsec
0 1 2 6 8 10 11 12
(A+B+C) √
(𝑨𝑨 + 𝑪𝑪 + 𝑫𝑫) √
(𝑨𝑨 + 𝑪𝑪 + 𝑫𝑫) √
(𝑨𝑨 + 𝑩𝑩 + 𝑪𝑪) √
(B+D)
√ √ √ √ √ √ √ √
This earns 2, 0.5 for each right choice. Wrong choice earns -0.25
6. Having a circuit that produces the 9’s complement of a BCD number (WXYZ). The outputs have
symbols that starts from A (i.e. A, B, …). Derive the simplified equations for the outputs as SoP
(sum of product). [8 marks]
Inputs Outputs YZ
Decimal
W X Y Z A B C D WX 00 01 11 10
0 0 0 0 0 1 0 0 1 00 1 1
1 0 0 0 1 1 0 0 0 01
2 0 0 1 0 0 1 1 1 11 x x x x
3 0 0 1 1 0 1 1 0 10 x x
4 0 1 0 0 0 1 0 1 𝐀𝐀(𝐖𝐖, 𝐗𝐗, 𝐘𝐘, 𝐙𝐙) = 𝐖𝐖 𝐗𝐗 𝐘𝐘
5 0 1 0 1 0 1 0 0 The correct map earns 0.5, if partially correct it
earns only 0.25. The function earns 0.5, if any added
6 0 1 1 0 0 0 1 1 non-correct, the function earns only 0.25.
7 0 1 1 1 0 0 1 0 YZ
8 1 0 0 0 0 0 0 1 WX 00 01 11 10
9 1 0 0 1 0 0 0 0 00 1 1
10 1 0 1 0 x x x x 01 1 1
11 1 0 1 1 x x x x 11 x x x x
12 1 1 0 0 x x x x 10 x x
13 1 1 0 1 x x x x
14 1 1 1 0 x x x x 𝐁𝐁(𝐖𝐖, 𝐗𝐗, 𝐘𝐘, 𝐙𝐙) = 𝐗𝐗 𝐘𝐘 + 𝐗𝐗 𝐘𝐘
15 1 1 1 1 x x x x The correct map earns 0.5, if partially correct it
earns only 0.25. The function earns 1, if any added
Each column in the output earns 1,
non-correct, the function earns only 0.5.
In each column, the numbers earn 0.75 & the don’t cares
earn 0.25 Note that the student may add one x for all lines
in any column, or one x for all (anything that indicate the
don’t cares)
YZ YZ
WX 00 01 11 10 WX 00 01 11 10
00 1 1 For each of C & D: 00 1 1
The correct map
01 1 1 earns 0.5, if partially 01 1 1
11 x x x x correct it earns only 11 x x x x
0.25. The function
10 x x earns 0.25, if any 10 1 x x
added non-correct,
remove 0.25 from the
map
C(W,X,Y,Z)= Y 𝐃𝐃(𝐖𝐖, 𝐗𝐗, 𝐘𝐘, 𝐙𝐙) = 𝐙𝐙
Logic Midterm 1/4/2023 Page 3 of 4
7. Using only two 3-bit adders, one OR and one inverter, design a circuit (derive the equations & draw
the circuit) that add two 3-bit binary numbers A2A1A0 & B2B1B0, to produce a sum S2S1S0 & a carry
C. Then do the following: * If the result is between 0 and 2 included add 3.
* If the result is between 4 and 14 included subtract 2.
Unmentioned numbers cannot occur as results of the sum. [8 marks]
1 0 0 0 1 0 1 1 𝐙𝐙 = 𝐗𝐗 Z earns 0.5
2 0 0 1 0 0 1 1
3 0 0 1 1 x x x
4 0 1 0 0 1 1 0
5 0 1 0 1 1 1 0
6 0 1 1 0 1 1 0
7 0 1 1 1 1 1 0
8 1 0 0 0 1 1 0
9 1 0 0 1 1 1 0
10 1 0 1 0 1 1 0
11 1 0 1 1 1 1 0
12 1 1 0 0 1 1 0
13 1 1 0 1 1 1 0
14 1 1 1 0 1 1 0
15 1 1 1 1 x x x
The numbers in all columns together earns 2
The don’t cares in all columns earns 0.5
S1S0
CS2
00 01 11 10
00 x
01 1 1 1 1
11 1 1 x 1 The figure earns 3:
1 for the first adder (inputs & outputs)
10 1 1 1 1
2 for the 2nd adder:
0.25 for C S2S1S0
𝐗𝐗(𝐂𝐂, 𝐒𝐒𝟐𝟐 , 𝐒𝐒𝟏𝟏 , 𝐒𝐒𝟎𝟎 ) = 𝐂𝐂 + 𝑺𝑺𝟐𝟐 1.5 for X,Y,Z, 0.5 for each one
0.25 for Cin=0
The correct map earns 0.75: 0.5 for the
numbers and 0.25 for the don’t cares, if
partially correct it earns only 0.25.
The function earns 1, if any added non-
correct, the function earns only 0.5.