0% found this document useful (0 votes)
15 views4 pages

Mid-Term (Apr. 2023) - Solution

This document is a midterm exam for the Logic Design course, consisting of various problems related to binary-coded decimal (BCD) arithmetic, Boolean functions, propagation delay calculations, and circuit design. The exam includes specific tasks such as simplifying Boolean functions using Karnaugh maps, calculating propagation delays, and designing circuits with given constraints. Each problem is assigned a specific score, and students are required to show their work for full credit.

Uploaded by

Jana Sala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views4 pages

Mid-Term (Apr. 2023) - Solution

This document is a midterm exam for the Logic Design course, consisting of various problems related to binary-coded decimal (BCD) arithmetic, Boolean functions, propagation delay calculations, and circuit design. The exam includes specific tasks such as simplifying Boolean functions using Karnaugh maps, calculating propagation delays, and designing circuits with given constraints. Each problem is assigned a specific score, and students are required to show their work for full credit.

Uploaded by

Jana Sala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Faculty of Computers and Artificial Intelligence Prof. Imane Aly Saroit/ Dr. Dina Tarek/ Dr.

Iman Ahmed
Information Technology Department Four pages - 60 minutes
IT212-SIT213-CS221 Logic Design 1 April 2023

Logic Design Midterm

Name: ____________________________________________ Id: ________________ (Sum=35)

Note: Steps (if exist) of each answer must be included.


1. Complete the following (0011.01010011) BCD + (00010100.1000) BCD [2 marks]
= ( 0001 1000 . 0011 0011 ) BCD

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

b. Get the simplified F as PoS (using k-map) [1 mark] F (W,X,Y,Z)= (X+Y)(X+Z)


Each correct term earns + 0.5, each added uncorrect term 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

d. Is it better to build the function as SoP or PoS and why? [1 mark]

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

F(W,X,Y,Z)=X+YZ F(W,X,Y,Z)= (X+Y)(X+Z)

Logic Midterm 1/4/2023 Page 1 of 4


3. If the propagation delay
of NOT, AND & XOR
are 3, 10 & 20 nsec
respectively, get the
propagation delay for
the following logic
circuit [1 mark].

Propagation delay of
the circuit = 43 nsec

4. Using Tabular method to simply F(A,B,C,D)= ΠM (0,1,2,6,8,10,11,12) as PoS (product of sum).


[8 marks]

F(A,B,C,D)= (A+B+C) (𝐀𝐀 + 𝐂𝐂 + 𝐃𝐃) (𝐀𝐀 + 𝐂𝐂 + 𝐃𝐃) (𝐀𝐀 + 𝐁𝐁 + 𝐂𝐂)


Convert the numbers
into binary earns 0.5

0 0 0 0 0 √ 0,1 0 0 0 - (A+B+C) 0,2,8,10 - 0 - 0 (B+D)


1 0 0 0 1 √ 0,2 0 0 - 1 √ 0,8,2,10 - 0 - 0 0.25
2 00 1 0 √ 0,8 - 0 0 0 √ 0.25
8 10 0 0 √ 2,6 0 - 1 0 (𝐀𝐀 + 𝐂𝐂 + 𝐃𝐃)
6 01 1 0 √ 2,10 - 0 1 0 √
10 10 1 0 √ 8,10 1 0 - 0 √
12 11 0 0 √ 8,12 1 - 0 0 (𝐀𝐀 + 𝐂𝐂 + 𝐃𝐃)
11 10 1 1 √ 10,11 1 0 1 - (𝐀𝐀 + 𝐁𝐁 + 𝐂𝐂)
This earns 1, 0.25 for This earns 2, 0.25 for This earns 2,
each group each combination 0.5 for each term

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

Logic Midterm 1/4/2023 Page 2 of 4


5. Complete the following: [2.5 marks]
(1010 0111.0101 1111) 84-2-1 = ( 61.39 ) 10 Each two digits earns 0.25

= ( 0110 0001 . 0011 1010 ) 7421 Each digit earns 0.25

= ( 1001 0100 . 0110 1100 ) Excess-3 Each digit 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]

Inputs Outputs The three outputs:


Decimal

C S2 S1 S0 X Y Z X X earns 1.75 (look at the bottom)


0 0 0 0 0 0 1 1 Y=1 Y earns 0.25

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.

Logic Midterm 1/4/2023 Page 4 of 4

You might also like