Difficulty: Easy
Correct Answer: ten
Explanation:
Introduction / Context: An encoder converts one-of-N active inputs into a binary code. The decimal-to-BCD encoder is a classic example found in learning laboratories and MSI catalogs. It accepts decimal digit lines and outputs a 4-bit Binary Coded Decimal representation. This question asks you to recall how many input lines such an encoder must have to cover digits 0–9.
Given Data / Assumptions:
Concept / Approach: Each decimal symbol must have a unique input wire in a simple one-hot interface. Therefore, a decimal-to-BCD encoder requires ten data inputs, each corresponding to a digit. The internal logic maps whichever input is asserted to its 4-bit BCD code on the outputs. Priority encoders extend this idea by resolving conflicts if multiple inputs are asserted simultaneously, typically choosing the highest-priority (largest) digit and producing a valid BCD code plus a “valid” flag.
Step-by-Step Solution:
List the symbols to be encoded: {0…9} → count = 10.Assign one input line per symbol: I0…I9.Map active input Ik to BCD code of k on outputs Q3..Q0.Confirm width: 4-bit BCD covers up to 9, with 10–15 typically unused or treated as don’t-cares.Verification / Alternative check: Check any standard truth table for a decimal-to-BCD encoder: exactly ten inputs are listed, with corresponding 4-bit outputs and often an “enable” and “valid” pin.
Why Other Options Are Wrong: Two, four, five, and sixteen do not match the count of decimal symbols; sixteen would be appropriate for hexadecimal encoders, not decimal.
Common Pitfalls: Confusing encoders with decoders (decoders have one code input and many outputs); mixing decimal and hexadecimal contexts.
Final Answer: ten
Discussion & Comments