Priority encoder: Difference between revisions

Content deleted Content added
Fixed multiple errors in simple encoder section (broken table, sentence structure errors, typos, etc).
Line 29:
 
==Simple encoder==
A simple encoder circuit is a [[one-hot]] to binary converter. That is, if there are of 2<sup>''n''</sup> input lines at the input, whereasand only one of them isat inmost will ever be 1, the binary code of this 'hot' line is produced a on the ''n'''-bit output lines.
 
For example, a single bit 4 to 2 simple encoder takes in 4 input bits and outputsproduces 2 output bits. The illustrated gate level example implements the simple encoder defined by the truth table, but it MUST be understood that for all the non-explicitly defined input combinations (i.e. inputs containing 0, 2, 3, or 4 high bits) the outputs are treated as don't cares. It makes no sense to infer the priority encoder if input circuit guarantees one and only one bit high in the input or if it is understood that non-single-active-inputs will produce garbage encodings.
 
{|align="right"
Line 39:
|}
{| class="wikitable" style="margin:0;"
!style="border-bottom:2px solid #000;"|AI<sub>3</sub>
!style="border-bottom:2px solid #000;"|AI<sub>2</sub>
!style="border-bottom:2px solid #000;"|AI<sub>1</sub>
!style="border-bottom:2px solid #000;"|AI<sub>0</sub>
!style="border-bottom:2px solid #000; border-left:2px solid #000;"| FO<sub>1</sub>
!style="border-bottom:2px solid #000;"|FO<sub>0</sub>
!style="border-bottom:2px solid #000;"|V
|-
| 0 || 0 || 0 || 0 ||style="border-left:2px solid #000;"| x || x || 0
|-
Line 55 ⟶ 57:
| 1 || 0 || 0 || 0 ||style="border-left:2px solid #000;"| 1 || 1 || 1
|}
{{caption|4 to 2 Simple Encoder}}
 
If input circuit guarantees one and only one bit high on the input or if it is understood that non-single-active-inputs will produce garbage encodings, a simple encoder is a better choice than a prioriy encoder, since it requires less logic.
 
==References==