Difficulty: Easy
Correct Answer: an encoder
Explanation:
Introduction / Context:
Digital systems frequently need to compress one-of-many signals into a compact binary representation. This occurs in keypad scanners, interrupt controllers, and sensor arrays. Identifying the right MSI device ensures correct design and pin budgeting.
Given Data / Assumptions:
Concept / Approach:
By definition, an encoder maps a one-hot or one-of-M input to an N-bit binary output. A decoder performs the reverse; a multiplexer selects one data input to drive an output; a comparator evaluates relationships between two binary words. Therefore, the correct device is an encoder.
Step-by-Step Solution:
Recognize mapping: one-hot input → compact code.Match with MSI definitions → encoder.Exclude other devices (decoder inverse, multiplexer selector, comparator relational logic).Conclude: the device is an encoder.
Verification / Alternative check:
Parts like 74148 (8-to-3) and 74HC147 implement this behavior directly, sometimes with priority to resolve multiple active inputs.
Why Other Options Are Wrong:
Decoder expands a code to one-hot. Multiplexer routes data rather than produces a code. Comparator outputs relation flags (less, equal, greater), not a binary index.
Common Pitfalls:
Assuming any single-output device is a comparator; forgetting the encoder/decoder directionality.
Final Answer:
an encoder
Discussion & Comments