Priority encoder: Difference between revisions

Content deleted Content added
Simple encoder: added the link to the page and removed unnecessary repeated inforation
added image of priority encoder.
Line 1:
A '''priority encoder''' is a [[Electronic circuit|circuit]] or [[algorithm]] that compresses multiple [[Binary code|binary]] inputs into a smaller number of outputs. The output of a priority encoder is the binary representation of the original number starting from zero of the most significant input bit. They are often used to control [[interrupt request]]s by acting on the highest priority encoder.
[[File:A 4-2 Priority Encoder .jpg|alt=A 4:2 Priority Encoder |thumb|486x486px|A 4:2 Priority Encoder ]]
 
If two or more inputs are given at the same time, the input having the highest priority will take [[:wikt:precedence|precedence]].<ref>M. Morris lora, Michael D. Ciletti, "Digital Design", 4th Edition, Prentice Hall, 2006, ISBN 978-0-13-198924-5.</ref> An example of a single bit 4 to 2 [[encoder]] is shown, where highest-priority inputs are to the left and "x" indicates an irrelevant value - i.e. any input value there yields the same output since it is superseded by higher-priority input. The output V indicates if the input is valid.
 
Line 28:
==Simple encoder==
[[File:A Simple 4-2 encoder using or gate.jpg|alt=A simple 4:2 Encoder using OR gate.|thumb|318x318px|A simple 4:2 Encoder using OR gate.]]
A [[Encoder (digital)|simple encoder]] circuit is a [[one-hot]] to binary converter. That is, if there are 2<sup>''n''</sup> input lines, and at most only one of them will ever be high, the binary code of this 'hot' line is produced on the ''n''-bit output lines.
 
==References==