A 4-bit priority encoder has inputs and in descending order of priority. The two-bit output is generated as 00, 01, 10, and 11 corresponding to inputs and , respectively. The Boolean expression of the output bit is ______.
- (A)
- (B)
- (C)
- (D)
A 4-bit priority encoder has inputs and in descending order of priority. The two-bit output is generated as 00, 01, 10, and 11 corresponding to inputs and , respectively. The Boolean expression of the output bit is ______.
ANSWER
, which is option (B).
Official answer: BSource: Official answer key, GATE 2024 EC (IISc Bengaluru)
Notation: means the complement of . In a priority encoder an input is encoded only when every higher-priority input is 0. So the output is when , when , when , and when .
Read off , the LSB of the code. for code (input ) and code (input ). for codes and .
Add up the conditions that give :
Don't-care: when all four inputs are 0 there is no valid input to encode, so the output for is a don't-care. Take it as 1 so it combines with the term:
Now . Factor out and apply the absorption rule with and :
Expanding gives , which is option (B). Check: this expression gives the right for all 15 valid input combinations, and none of the other options does.
Cross-check with the other output bit. (with the same don't-care) . That is option (A), so (A) is the expression for , not .
KEY IDEA
Each input of a priority encoder is gated by the complements of every higher-priority input. Write as the sum of the conditions whose code has LSB 1, then set the all-zero input (no valid input) to 1 as a don't-care and simplify with .
WATCH OUT FOR
Leaving out the don't-care gives , which is not among the options. Other common slips: dropping the priority gating (writing just ), or choosing (A), which is the expression for the other output bit .
From the GATE 2024 EC paper. Every question of this paper · Download the full paper · All 12 Combinational questions, with notes