Priority Encoder Schematic. In this case even if more than one input is 1 at the same time the output will be the binary code corresponding to the input which is having higher priority. It gives a coded output by assigning a priority to the bits of input.
Here the input y3 has the highest priority whereas the input y0 has the lowest priority. A circuit diagram of this encoder is shown below. Here and gate inverter combination are used for producing a valid code at the outputs even when multiple inputs are equal to 1 at the same time.
A priority encoder overcomes this disadvantage of the binary encoder.
4 2 priority encoder truth table. If two or more inputs are high at the same time the input having the highest priority will take precedence. Here the input y3 has the highest priority whereas the input y0 has the lowest priority. This valid bit will check if all the four input pins are low 0 if low the bit will also make itself low stating that the output is not valid thus we can overcome the first drawback mentioned above.