Encoder (digital)

If the input circuit can guarantee at most a single-active input, a simple encoder is a better choice than a priority encoder, since it requires less logic to implement.

However, a simple encoder can generate an incorrect output when more than a single input is active, so a priority encoder is required in such cases.

It thus reduces the number of transmission lines and can be compared to a multiplexer.

Only one of the inputs become "high" (logic state "1") at a time.

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.

A General encoder's block diagram.
A General encoder's block diagram.
Gate level schematic of a simple 4:2 line encoder
Gate level schematic of a simple 4:2 line encoder
Gate level schematic of a simple 8:3 encoder.
Gate level schematic of a simple 8:3 encoder. 4-input OR gates have been used for simplicity.