Title: EEL-3705%20TPS%20QUIZZES
1EEL-3705TPS QUIZZES
2Quiz 4-1
3Using the 2x4 Decoder shown below and two-input
OR gates, design a logic circuit which implements
4Solution
5Quiz 4-2
6Using the 3x8 Decoder shown below and two-input
OR gates, design a logic circuit which implements
7Solution
8Solution
9Quiz 4-3
10Using the 3x8 Decoder shown below and two-input
OR gates, design a logic circuit which implements
11Solution
12Quiz 4-4a
13Using 3x8 Decoders with Active LOW Enables and
NOT gates, design a logic circuit which
implements a 4x16 decoder
14Solution
15Quiz 4-4b
16Using standard two-input and three-input logic
gates, design an encoder circuit that implements
the following truth table
a b c y1 y0
1 d 1 0 1
d 1 0 1 0
0 0 d 1 1
17Solution
1
1
1
1
18Y1
19Solution
1
1
1
1
20Y0
21Quiz 4-5
22Using standard two-input logic gates, design a
2X1 MUX which implements
Your circuit should have three inputs, Data
inputs D0 and D1, and control input S.
Hint Develop the truth table first
23Solution
D1 D0 S F
d D0 0 D0
D1 d 1 D1
24Solution
25Demonstrations
261 bit deep 2x1 MUX
- 2 Logical Data Inputs 1 bit deep
- 1 Control Input
- 1 Logical Output 1 bit deep
271 bit deep 4x1 MUX
- 4 Logical Data Inputs 1 bit deep
- 2 Control Inputs
- 1 Logical Output 1 bit deep
282 bits deep 2x1 MUX
- 2 Logical Data Inputs 2 bits deep
- 1 Control Input
- 1 Logical Output 2 bits deep
292 bits deep 4x1 MUX
- 4 Logical Data Inputs 2 bits deep
- 2 Control Inputs
- 1 Logical Output 2 bits deep
304 bits deep 2x1 MUX
- 2 Logical Data Inputs 4 bits deep
- 1 Control Input
- 1 Logical Output 4 bits deep
31Quiz 4-6
32Using the 2X1 MUX shown below and NOT gates,
design a logic circuit which implements
33Solution
We need
We have
Let as, D0b, D1b
34Quiz 4-7
35Using standard two-input logic gates, design a
2X1 MUX with Enable which implements
Your circuit should have four inputs, Data inputs
D0 and D1, and control inputs E and S.
36Solution
D1 D0 E S F
d d 0 d 0
d D0 1 0 D0
D1 d 1 1 D1
37Solution
38Quiz 4-8
39Design a 4x1 MUX using the 2x1 MUX with enable
shown below, NOT, and OR gates
Your design should implement this equation
40Solution
41Quiz 4-9
42Using the 4x1 MUX shown below and NOT gates,
design a logic circuit which implements
43Solution
44Quiz 4-10
45Using the 4x1 MUX shown below and NOT gates,
design a logic circuit which implements
46Solution
c
c
F
c
c
a
b
47Class Design Project
48Quiz 4-11
49Design a logic circuit (lets call this module A)
which converts a three bit signed magnitude input
into its equivalent three bit twos complement
output. Let X20 indicate a positive number and
X21 indicate a negative number.X1 and X0
represent the magnitude of the number. For
example
Module A
INPUT X2..0 OUTPUT A2..0
Hint Really this is a hint ?!!!, Develop the
truth table for all possible input combinations
50Solution
X2 X1 X0 A2 A1 A0
0 0 0 0 0 0
0 0 1 0 0 1
0 1 0 0 1 0
0 1 1 0 1 1
1 0 0 0 0 0
1 0 1 1 1 1
1 1 0 1 1 0
1 1 1 1 0 1
51Solution
52Solution
1
1
1
1
53Quiz 4-12
54Design a logic circuit (lets call this module B)
which computes where A is a three bit twos
complement input with a domain of -3 to 3.
How many bits are you going to need for B?
Module B
INPUT A2..0 OUTPUT B??..0
Hint This is really another hint!!!,
Precompute B in decimal for each possible A and
develop a truth table relating B to A in binary.
Assume dont care for B when A gt 3.
55Solution
A2 A1 A0 B B3 B2 B1 B0
0 0 0 -1 1 1 1 1
0 0 1 1 0 0 0 1
0 1 0 3 0 0 1 1
0 1 1 5 0 1 0 1
1 0 0 D d d d d
1 0 1 -7 1 0 0 1
1 1 0 -5 1 0 1 1
1 1 1 -3 1 1 0 1
56Solution
57Solution
1
1
1
1
58Quiz 4-13
59Using Half Adders and NOT gates, design a logic
circuit which will compute the 2s comp of a
4-bit signed binary number
Module C
INPUT B3..0 OUTPUT C3..0
Hint
Calculate the 1s complement and add 1.
60Solution
61Quiz 4-14
62Using Module C (i.e. 2s comp module) and the
4-bit wide 2X1 MUX shown below, design a logic
circuit which will calculate the sign magnitude
of a 4-bit 2s complement number. You may assume
maximum magnitude is 7. Your design should also
havean output labeled sign which is sign1 for
negative values.
Module D
INPUT B3..0 OUTPUT D2..0 Sign
63Solution
64Quiz 4-15
65We have the design for four modulesA 4-bit
Sign Magnitude to 2s complementB y2x-1 for
Xlt4C 4-bit 2s complement generatorD 4-bit
2s complement to Sign Magnitude
Team with two other groups. One group (X) should
implement module A One group (Y) should
implement module B One group (Z) should
implement module C,D Pick your groups and decide
who is X,Y, and Z.
66I will give a series of inputs to Group X, who
should compute A A2..0 and give it to group Y,
who then needs to compute BB3..0 and give it
to group Z who then needs to compute DD2..0
and Sign. Group D should convert the result to
decimal using a minus sign to represent a
negative number and record it on the board. Use
the index card to pass data from one module to
the next.
67Block Diagram
From Dr. Perry
Sign
X2..0
A2..0
B3..0
D2..0
A
B
C/D
Record Results On Board
68X000
69X100
70X001
71X101
72X011
73X111
74Quiz 4-16
75Let tgate15ns, calculate the worst case delay
for a 32-bit adder for the three circuits below.
Circuit Delay
Ripple Carry (2n1)tgate
Fully Parallel 2tgate
Carry Look Ahead 4tgate
76Let tgate15ns, calculate the worst case delay
for a 32-bit adder.
Circuit Delay Delay
Ripple Carry (2n1)tgate 6515ns975ns
Fully Parallel 2tgate 215ns30ns
Carry Look Ahead 4tgate 415ns60ns
77Quiz 4-17
78Given the 4-bit add/sub module shown below, let
AD, BF, ADD0, what is S in ADDER module in
hex and decimal?
79Given the 4-bit add/sub module shown below, let
AD, BF, , what is S?
DFC -3(-1)-4
80Quiz 4-18
81Given the 4-bit add/sub module shown below, let
AD, BF, ADD1, what is S in hex and decimal?
82Given the 4-bit add/sub module shown below, let
AD, BF, ADD1, what is S?
D-FE -3-(-1)-2
83Quiz 4-19
84Overflow/Underflow Detection
- Recall
- That is, if for the MSB carry_in is not equal to
carry_out, overflow or underflow has occurred.
85Given a 4-bit adder, indicate whether each
operation below gives an overflow(O),
underflow(U), or correct (OK) answer.
- 1. D4
- 2. 6 4
- 3. 7 A
- 4. F F
- 5. 8 F
86Given a 4-bit adder, indicate whether each
operation below gives an overflow(O),
underflow(U), or correct (OK) answer.
- 1. D4 1 (OK)
- 2. 6 4 A (O)
- 3. 7 A 1 (OK)
- 4. F F E (OK)
- 5. 8 F 7 (U)
87Quiz 4-20
88Given a 4-bit adder, indicate whether each
operation below gives an overflow(O),
underflow(U), or correct (OK) answer.
- 1. D-7
- 2. 6 -4
- 3. 7 - A
- 4. F - F
- 5. 8 - 1
89Given a 4-bit adder, indicate whether each
operation below gives an overflow(O),
underflow(U), or correct (OK) answer.
- 1. D-76 (U)
- 2. 6 -4 2 (OK)
- 3. 7 - A D (O)
- 4. F - F 0 (OK)
- 5. 8 - 1 7 (U)
90Quiz 4-21
91Develop the truth table fora 2 bit signed
comparator?
- Your truth table should have four inputs
- b1 b0 a1 a0 and three outputs
- F1 (AltB)
- F2 (A gt B)
- F3 (A B)
- Assume 2-bit signed (i.e. 2s comp) values
- Hint convert to decimal and compare
92Solution
b1 b0 a1 a0 AltB AgtB AB
0 0 0 0 0 0 1
0 0 0 1 0 1 0
0 0 1 0 1 0 0
0 0 1 1 1 0 0
0 1 0 0 1 0 0
0 1 0 1 0 0 1
0 1 1 0 1 0 0
0 1 1 1 1 0 0
93Solution
b1 b0 a1 a0 AltB AgtB AB
1 0 0 0 0 1 0
1 0 0 1 0 1 0
1 0 1 0 0 0 1
1 0 1 1 0 1 0
1 1 0 0 0 1 0
1 1 0 1 0 1 0
1 1 1 0 1 0 0
1 1 1 1 0 0 1
94Quiz 4-22
95Let AC and B7and S1..000, what is F in
hex?
F3..0
96Let AC and B7and S1..000, what is F?
F3..0
AND Operation F04
97Quiz 4-23
98Let AC and B7and S1..010, what is F in
hex?
F3..0
99Let AC and B7and S1..010, what is F?
F3..0
NOT A Operation F03
100Quiz 4-24
101Let AC and B7and S1..011, what is F hex?
F3..0
102Let AC and B7and S1..010, what is F?
F3..0
XOR Operation F0B
103Quiz 4-25
104Let A3 and B4,S1..000, What is F in hex?
105Let A3 and B4,S1..000, What is F in hex?
FAB F07
0
0
106Quiz 4-26
107Let A3 and B4,S1..010, What is F in hex?
108Let A3 and B4,S1..010, What is F in hex?
FA1 F04
0
0