To Design and Simulate Priority Encoder
To Design and Simulate Priority Encoder
AIM:
To simulate and design Priority Encoder.
THEORY:
A priority encoder provides n bits of binary coded output representing the
position of the highest order active input of 2n inputs. If two or more inputs are
high at the same time, the input having the highest priority will take precedence.
So, when an input with a higher priority is present, all other inputs with a lower
priority will be ignored.
A valid indicator, V, is included to indicate whether or not the output is valid.
Output is invalid when no inputs are active i.e. V = 0 and Output is valid when
at least one input is active i.e. V = 1.
A 4 to 2 priority encoder has four inputs Y3, Y2, Y1 & Y0 and two outputs A1
& A0. Here, the input, Y3 has the highest priority, whereas the input, Y0 has the
lowest priority. 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.
If at least one input of the encoder is ‘1’, then the code available at
outputs is a valid one. In this case, the output, V will be equal to 1.
If all the inputs of encoder are ‘0’, then the code available at outputs is
not a valid one. In this case, the output, V will be equal to 0.
TRUTH TABLE:
INPUTS OUTPUTS
Y3 Y2 Y1 Y0 A1 A0 V
0 0 0 0 0 0 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
A0=Y3+Y2′Y1
V=Y3+Y2+Y1+Y0
We can implement the above Boolean functions using logic gates. The circuit
diagram of 4 to 2 priority encoder is shown in the following figure.
8 to 3 Priority Encoder:
A2 = E4 + E5 + E6 + E7
V = E0 + E1 + E2 + E3 + E4 + E5 + E6 + E7
SIMULATED OUTPUT:
A 4 to 2 Priority Encoder:
A 4 to 2 Priority Encoder:
Figure 8: As we can see as soon as all the inputs signal are 0, there is break in waveform
i.e. it shows high impedance.
An 8 to 3 Priority Encoder:
Figure 9: As we can see as soon as all the inputs signal are 0, there is break in waveform
i.e. it shows high impedance.