Difference between multiplexer and decoder

What is the difference between a multiplexer and a decoder? Lets assume a 2-to-4 decoder and a 4-to-1 multiplexer, what I understand is they both select one input based on the selector's combination. Is there any scenario that a multiplexer can be replaced by a decoder and vice versa?

• I'm trying to imagine any scenario where one could replace the other. None are coming to mind (except trivial cases.) The decoder sets (or clears) the sole indicated output line, out of several output lines (which then have the opposite value from the indicated line.) The multiplexer passes along the state of the indicated input, chosen from several input lines, to the only output line. Have you looked at the truth tables or the behavioral block diagrams for either of these devices? – jonk Nov 24 '18 at 5:05
• they both select one input based on the selector ... that is incorrect .... one selects an input, the other selects an output – jsotola Nov 24 '18 at 6:28
• Your question is faulty because you assert things that are wrong. Maybe if you googled the difference you would answer your own question. – Andy aka Nov 24 '18 at 9:42