Difficulty: Easy
Correct Answer: 1,0,0
Explanation:
Introduction / Context:
A digital magnitude comparator indicates whether the first operand (P) is greater than, equal to, or less than the second operand (Q). Standard devices (e.g., 7485) output exactly one active signal among GT, EQ, and LT for any valid pair of inputs—this is known as a one-hot encoding.
Given Data / Assumptions:
- Exactly one output should be high (1) for any non-error case.
Concept / Approach:
For a valid comparator, the output pattern must be one-hot: either (1,0,0) when P>Q, (0,1,0) when P=Q, or (0,0,1) when P
Step-by-Step Solution:
Verification / Alternative check:
Compare to the 7485 truth table: For any unequal operands, exactly one of GT or LT is asserted; EQ is asserted only for complete equality.
Why Other Options Are Wrong:
Common Pitfalls:
Assuming multiple flags can be high; mis-ordering outputs (ensure the order matches the question: P>Q, P=Q, P
Final Answer:
1,0,0
Discussion & Comments