Fundamental Digital Electronics/Digital Encoder

From Wikibooks, open books for an open world
Jump to: navigation, search

Digital Encoder[edit]

Digital Encoder is a Digital Device opposite of the Digital Decoder . A simple encoder circuit can receive a single active input out of 2n 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. 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 bits) the outputs are treated as don't cares. Thus this implementation is useless as a priority encoder and only useful as a simple encoder if some previous circuit guarantees that there is one and only one bit high in the input or if it is understood that non-single-active-inputs will produce garbage encodings.

Gate level circuit diagram of a single bit 4-to-2 line encoder
I3 I2 I1 I0 O1 O0
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1

0 - 16 Encoder[edit]