In the following truth table, V = 1 if and only if the input is valid. D0 D1…
2013
In the following truth table, V = 1 if and only if the input is valid.
D0 | D1 | D2 | D3 | X0 | X1 | V |
0 | 0 | 0 | 0 | x | x | 0 |
1 | 0 | 0 | 0 | 0 | 0 | 1 |
x | 1 | 0 | 0 | 0 | 1 | 1 |
x | x | 1 | 0 | 1 | 0 | 1 |
x | x | x | 1 | 1 | 1 | 1 |
What function does the truth table represent?
- A.
Priority encoder
- B.
Decoder
- C.
Multiplexer
- D.
Demultiplexer
Attempted by 8 students.
Show answer & explanation
Correct answer: A
Concept
An encoder maps an active input line to a binary code. A priority encoder handles the case where several input lines are active at once: it fixes a priority order and outputs the code of the highest-priority active line. A separate Valid (V) output signals whether any input line is active at all. The don't-care (x) entries on the lower-priority inputs are the signature: once a higher-priority input is 1, the lower inputs no longer affect the output.
Applying it to this table
Read the output code as X0X1 with X0 as the most-significant bit, matching the table's column values:
All inputs 0 → V = 0: nothing is active, so the output is marked invalid.
D0 = 1 (lowest priority) → X0X1 = 00, V = 1.
D1 = 1 → X0X1 = 01, with D0 shown as x (D0 is ignored once D1 is active).
D2 = 1 → X0X1 = 10, with D0, D1 = x.
D3 = 1 (highest priority) → X0X1 = 11, with all lower inputs = x.
So the 2-bit output always names the highest-priority active line (Dᵢ → i) and V flags validity — exactly a 4-to-2 priority encoder with a valid output.
Cross-check by elimination
Plain encoder: has no don't-cares and gives a wrong code when two inputs are high simultaneously — the table's x entries rule this out.
Decoder: does the reverse mapping (a code in, exactly one line out); here the data lines are inputs and the code is the output.
Multiplexer / Demultiplexer: both require separate select lines, which this table has none of, and a (de)mux moves a single value rather than producing a priority code.