Priority encoder: Difference between revisions

Content deleted Content added
Removed from "Encoder" page, which is now more of a high-level disambiguation page
Add related simple encoder circuit
Line 23:
 
Priority encoders can be easily connected in arrays to make larger encoders, such as a 16 to 4 encoder made from six 4 to 2 priority encoders (four encoders having the signal source connected to their inputs, and two encoders that take the output of the first four as input).
 
The priority encoder is an improvement on a simple encoder circuit, in terms of handling all possible input configurations.
 
==Simple Encoder==
 
A simple encoder circuit can receive a single active input out of 2<sup>''n''</sup> input lines generate a binary code on ''n'' parallel output lines.
 
For example a single bit 4 to 2 encoder takes in 4 bits and outputs 2 bits. Proper function requires that only one input line is active at a time.
 
{|align="right"
|[[Image:Encoder diagram.svg|thumb|212px|Gate level circuit diagram of a single bit 4-to-2 line encoder]]
|align="left"|
<div class="thumb"></div>
|}
{| class="wikitable" style="margin:0;"
!style="border-bottom:2px solid #000;"|I<sub>3</sub>
!style="border-bottom:2px solid #000;"|I<sub>2</sub>
!style="border-bottom:2px solid #000;"|I<sub>1</sub>
!style="border-bottom:2px solid #000;"|I<sub>0</sub>
!style="border-bottom:2px solid #000; border-left:2px solid #000;"| O<sub>1</sub>
!style="border-bottom:2px solid #000;"|O<sub>0</sub>
|-
| 0 || 0 || 0 || 1 ||style="border-left:2px solid #000;"| 0 || 0
|-
| 0 || 0 || 1 || 0 ||style="border-left:2px solid #000;"| 0 || 1
|-
| 0 || 1 || 0 || 0 ||style="border-left:2px solid #000;"| 1 || 0
|-
| 1 || 0 || 0 || 0 ||style="border-left:2px solid #000;"| 1 || 1
|}
{{caption|4 to 2 encoder}}