Answer
A multiplexer with 5 input lines
Work Step by Step
A multiplexer with n lines can represent at max 2$^{n}$ operations. So a multiplexer with 4 lines will only represent 16 operations which is less than required but multiplexer with 5 lines can represent 32 operations so a multiplexer with 5 lines will be able to represent 20 operations.
We need a 1-of-20 multiplexer, which means:
- Inputs: 20 operation outputs (from the ALU's internal logic units)
- Selector: 5-bit control signal
- Output: The result of the selected operation
This can be implemented using:
- A 5-to-32 decoder (standard chip), with only 20 outputs used
- OR a custom 5-to-20 decoder if available
- The decoder activates one of 20 enable lines, each tied to a specific operation