Page 88 - DCAP108_DIGITAL_CIRCUITS_AND_LOGIC_DESIGNS
P. 88

Unit 5: Combinational Circuits



                                                                                                  Notes
                                    Figure 5.6: A 4-to-2 Binary Encoder

                                   w     w    w     w    y     y
                                    3     2     1    0    1    0
                                    0    0     0    1     0    0
                                    0    0     1    0     0    1
                                    0    1     0    0     1    0
                                    1    0     0    0     1    1

                                            (a) Truth table














                                              (b) Circuit




                        Draw a logic diagram for 8-to-2 binary encoder.


            5.3.2 Priority Encoder
            Another useful class of encoders is based on the priority of input signals. In a priority encoder each
            input has a priority level associated with it. The encoder outputs indicate the active input that has
            the highest priority. When an input with a high priority is asserted, the other inputs with lower
            priority are ignored. The truth table for a 4-to-2 priority encoder is shown in Figure 5.7. It
            assumes that w0 has the lowest priority and w3 the highest. The outputs y1 and y0 represent
            the binary number that identifies the highest priority input set to 1. Since it is possible that
            none of the inputs is equal to 1, an output, z, is provided to indicate this condition. It is set
            to 1 when at least one of the inputs is equal to 1. It is set to 0 when all inputs are equal to 0.
                             Figure 5.7: Truth Table for a 4-to-2 Priority Encoder

                                 w 3   w 2  w 1  w 0   y 1  y 0  z
                                  0    0     0    0    d    d    0
                                  0    0     0    1    0    0    1
                                  0    0     1    x    0    1    1
                                  0    1     x    x    1    0    1
                                  1    x     x    x    1    1    1

            The outputs y1 and y0 are not meaningful in this case, and hence the first row of the truth table can
            be treated as a don’t-care condition for y1 and y0. The behaviour of the priority encoder is most
            easily understood by first considering the last row in the truth table. It specifies that if input w3
            is 1, then the outputs are set to y1y0 = 11. Because w3 has the highest priority level, the values of
            inputs w2, w1, and w0 do not matter. To reflect the fact that their values are irrelevant, w2, w1, and
            w0 are denoted by the symbol x in the truth table. The second-last row in the truth table stipulates
            that if w2 = 1, then the outputs are set to y1y0 = 10, but only if w3 = 0. Similarly, input w1 causes



                                             LOVELY PROFESSIONAL UNIVERSITY                                    83
   83   84   85   86   87   88   89   90   91   92   93