Machine-translated by Google. Questions are authored in English.
Top

Discussion

An encoder performs which function?

  • A.Converts \(2^{n}\) input lines into an \(n\)-bit output code
  • B.Converts an \(n\)-bit code into \(2^{n}\) output lines
  • C.Selects one of several inputs for a single output
  • D.Stores a single bit of data

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.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.