The term multiplexer has uses in several fields of application:
In electronics, a multiplexer or mux is a device that combines several electrical signals into a single signal. There are different types of multiplexers for analog and digital circuits.
In digital signal processing, a multiplexer (often abbreviated to "mux" or "muldex") is a device for taking several separate digital data streams and combining them together into one data stream of a higher data rate. This allows multiple data streams to be carried from one place to another over one physical link, which saves cost.
At the receiving end of the data link a complementary demultiplexer or "demux" is normally required to break the high data rate stream back down into the original lower rate streams. In some cases, the far end system may have more functionality than a simple demultiplexer and so, whilst the demultiplexing still exists logically, it may never actually happen physically. This would be typical where a multiplexer serves a number of IP network users and then feeds directly into a router which immediately reads the content of the entire link into its routing processor and then does the demultiplexing in memory from where it will be converted directly into IP packets.
It is usual to combine a multiplexer and a demultiplexer together into one piece of equipment and simply refer to the whole thing as a "multiplexer". Both pieces of equipment are needed at both ends of a transmission link because most communications systems transmit in both directions.
A real world example is the creation of telemetry for transmission from the computer/instrumentation system of a satellite, space craft or other remote vehicle to a ground system.
Digital circuit design
In digital circuit design, a two-input multiplexer is a simple connection of logic gates whose output Y is either input A or input B depending on the value of a third input S which selects the input. Its boolean equation is:
Y = (A and S) or (B and not S)
which can be expressed as the truth table:
A B S | Y ------+-- 0 0 0 | 0 (pick B) 0 0 1 | 0 (pick A) 0 1 0 | 1 (pick B) 0 1 1 | 0 (pick A) 1 0 0 | 0 (pick B) 1 0 1 | 1 (pick A) 1 1 0 | 1 (pick B) 1 1 1 | 1 (pick A)
or as the Karnaugh map:
Y S | 0 1 ---+----- AB 00 | 0 0 01 | 1 0 11 | 1 1 10 | 0 1
Demultiplexers are sometimes convenient for designing general purpose logic. Basically, the inputs to the set of logic functions must be routed to the selection bits. Any function of the selection bits can be constructed by logically OR-ing the correct set of outputs.
Analogue circuit design
In analogue circuit design, a multiplexer is a special type of analogue switch that connects one signal selected from several inputs to a single output.