Priority Encoder
Priority Encoder
Encoding is the converse of decoding. Given a set of input lines, where one has been
selected, provide a code corresponding to that line.
Contains 2n (or fewer) input lines and n output lines. Implemented with OR gates. An example:
F0 D0
F1 F2 F3
4-to-2 Encoder
D1
2-bits code
Encoder
Truth table:
F0 F1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 F 2 F3 0 0 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 0 0 1 1 0 1 1 D1 0 0 1 1 X X X X X X X X X X X X D0 0 1 0 1 X X X X X X X X X X X X
Encoder
With the help of K-map (and dont care conditions),
can obtain:
D0 = F1 + F3 D1 = F2 + F3
Priority Encoder
When more than one input can be active, the priority encoder must be used. It includes priority function The output is set to correspond to the highest active input. Example
If inputs 0,1, and 3 are active, the output is set to S1S0=11, corresponding to input 3.
X
X X
1
X X
0
1 X
0
0 1
0
1 1
1
0 1
SOLVING Y1 and Y0
Y1= D2 +D3 Y0= D3 + D2.D1
Design
This circuit is seven distinct circuits, one for each segment. For each segment we create a K-map, construct the minimal Boolean expression and the logic diagram.
a segment
a = w + xy + xy + yz
b and c segments
b = X2 + X1X0+X1X0
c = X2 + X1 + X0
Diagrams
b = X2 + X1X0+X1X0 c = X2 + X1 + X0