COMP212S2005MIDTERMEXAM1P5..ID      NAME

(2a) The following combinational circuit is called 4-to-2 encoder which assigns the output value 00, 01, 10, 11, depending on which of 4 input lines, A0..3, are active (in the 1 state) and their relative priorities (for example, if lineA0 and lineA2 are both active, then assign 00, code for lineA0 ). When no inputs are active, the default output gives priority to A0 (F0F1=00). Design this encoder by using the basic gates, ANDs, NOTs, and ORs.

 

 

 

 

  (2b) The following design is an attemp to combine two D-type flip-flops and the encoder built in (2a) to store the data, F0 and F1. Analyze the circuit and, if there were some problems, state the reasons and correct them.