Digital_encoder

Encoder (digital)

Encoder (digital)

Digital electronic circuit


An encoder (or "simple encoder") in digital electronics is a one-hot to binary converter. That is, if there are 2n 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. A binary encoder is the dual of a binary decoder.

A General encoder's block diagram.

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.

Types of encoder

2n-to-n encoders

A -to-n encoder has n number of outputs in correspondence to the number of inputs. 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.

For example, a 4-to-2 simple encoder takes 4 input bits and produces 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.[1]

4-to-2 encoder

Gate level schematic of a simple 4:2 line encoder
Gate level schematic of a simple 4:2 line encoder
Truth Table
InputOutput
I3I2I1I0 O1O0
0000 x
0001 00
0010 01
0100 10
1000 11

8-to-3 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.
Truth Table
InputOutput
I7I6I5I4 I3I2I1I0 O2O1O0
0000 0000 x
0000 0001 0 00
0000 0010 0 01
0000 0100 0 10
0000 1000 0 11
0001 0000 1 00
0010 0000 1 01
0100 0000 1 10
1000 0000 1 11

See also


References

  1. "Binary Encoders And Their Applications". Electronics Hub. 2015-06-29. Retrieved 2017-05-01.

Share this article:

This article uses material from the Wikipedia article Digital_encoder, and is written by contributors. Text is available under a CC BY-SA 4.0 International License; additional terms may apply. Images, videos and audio are available under their respective licenses.