Logic circuits

Which circuit outputs, in binary, the number of the highest-priority input when several inputs are 1 at the same time?

  1. APriority encoder
  2. BDemultiplexer
  3. CComparator
Show answer and explanation

Answer: A. Priority encoder

An encoder converts which input is 1 into a binary code, and a plain encoder assumes only one input is active. A priority encoder outputs the index of the highest-priority active input even when several are 1, plus a valid flag indicating whether any input is active. It is used to select requests in interrupt controllers and to find the leading 1 when normalizing floating-point numbers (leading-zero detection).

  • A. Correct. It outputs the number of the highest-priority input.
  • B. A demultiplexer routes one input to a selected output.
  • C. A comparator compares two values for size or equality.

Related calculators

Books on Logic circuits Ad

Learn hands-on: parts and kits

Building real circuits is a good way to check what you learned in the questions.

As an Amazon Associate I earn from qualifying purchases.

More Logic circuits questions

  1. What is the drawback of a ripple-carry adder made by chaining full adders?
  2. Which correctly describes the hold time of a flip-flop?
  3. Which correctly describes clock skew in a synchronous circuit?
  4. What is the third state that the output of a tri-state buffer can take?
  5. What range of integers can be represented in 8-bit two's complement?

Comparisons in this topic