digital logic

profileajadiq8
ee422-h.w_2.pdf

ECE 422 Dr. N. El Naga

1

Homework #2

1. Using 3/8 binary decoder and the necessary gate, implement the following function:

f(A,B,C,D) = P0 + P2 + P3 + P6

2. Using 8/3 binary encoder and necessary gates, design and implement the 8/3 priority encoder shown below:

.

.

.

E

E

I I

I

2

2

2

0

1

2

1

0

7

o

i

Priority Encoder

3. Using the 8/3 priority encoder shown above and OR gates, show how to build a 16/4

priority encoder

4. Using 2/4 binary decoders and the minimum number of gates, construct the following: a) 3/8 binary decoder. b) 4/16 binary decoder. 5. a) Construct the truth table for a full subtractor circuit.

b) Two 4-bit data inputs multiplexers are used to realize a full subtractor. One is used to generate the difference output Di, while the other is used to generate the output borrow Bi+1 as shown below. What are the data inputs to each one of these multiplexers to realize its function.

ECE 422 Dr. N. El Naga

2

0 1 2 3

0 1 2 3

X i Yi

X Y

D i

B i

i i

?

?

X i Yi

D i

B i+1

Full-Subtr actor

B i+1

F.S.