An encoder performs which function?
Answer: C
Correct answer: Converts \(2^{n}\) input lines into an \(n\)-bit output code
An encoder takes \( 2^{n} \) input lines, of which one is active, and produces the \( n \)-bit binary code identifying which. A decimal-to-BCD encoder, for example, has ten inputs and four outputs. Its inverse is the decoder, described by the second option, which takes an \( n \)-bit code and activates one of \( 2^{n} \) outputs - used for address decoding and for driving displays. A plain encoder assumes only one input is active at a time and produces nonsense if two are. A priority encoder removes that limitation by responding to the highest-numbered active input and ignoring the rest, which is exactly what an interrupt controller needs when several devices request service at once. The third option describes a multiplexer and the fourth a flip-flop. Encoders and decoders together allow a keyboard, with one line per key, to send a compact code over few wires and have it expanded again at the other end.
Please log in or register to report this question.