Skip to main content

Digital Logic · Latches, flip-flops, and sequential circuits

A 4-to-2 priority encoder has request inputs I₃,I₂,I₁,I₀, binary outputs A₁,A₀, and a…

Problem

Digital Logic practice problem

A 4-to-2 priority encoder has request inputs I3,I2,I1,I0I_3,I_2,I_1,I_0, binary outputs A1,A0A_1,A_0, and a valid flag GSGS. Input I3I_3 has the highest priority and I0I_0 the lowest. The contract, for every one of the sixteen input words, is:

• GS=1GS=1 if and only if at least one request is 11;
• if GS=1GS=1, then A1A0A_1A_0 is the binary index of the highest-priority request that is 11;
• if GS=0GS=0, then A1A0=00A_1A_0=00.

(a) Write sum-of-products expressions for GSGS, A1A_1, and A0A_0 that realize this contract on all sixteen input words.

(b) Evaluate the triple (A1A0,GS)(A_1A_0,GS) for each of the request vectors I3I2I1I0∈{0000,0001,0010,0100,1000,1010,0110}I_3I_2I_1I_0\in\{0000,0001,0010,0100,1000,1010,0110\}.

(c) A proposed implementation uses A1=I3+I2A_1=I_3+I_2, A0=I3+I1A_0=I_3+I_1, and GS=I3+I2+I1+I0GS=I_3+I_2+I_1+I_0. Identify every vector among the seven listed in (b) for which this proposal violates the contract, and state the incorrect (A1A0,GS)(A_1A_0,GS) it produces on each such vector.

Hint

Hint

Priority means a higher request hides every lower request: write each output bit as “the winner’s index has this bit set,” not as a plain OR of all requests that would set it.

Check your work

Work the problem yourself first. Then open it in Training to check your answer and read the full worked solution.

The answer check and full solution for this problem come with ProofAnvil Practice membership ($19 USD monthly). See membership. Or start with the free Digital Logic sample problem: Try the free sample problem.

More Digital Logic practice problems

Back to Digital Logic

An original ProofAnvil practice problem, written for this course. ProofAnvil is a practice course, not a homework-answer service.