Multiplexers
A multiplexer, often abbreviated as MUX, is a combinational circuit that selects binary information from one of input data lines and directs it to a single output line. The selection of a particular input data line is controlled by a set of selection inputs. A -to-1 multiplexer has input data lines and selection lines whose bit combinations determine which input data line is selected for the output.
4-to-1-Line Multiplexer
Consider a 4-to-1-line multiplexer, which has four input data lines () and two selection lines (). Each input data line is connected to one input of an AND gate. The selection inputs are decoded to select a specific AND gate. The outputs of these AND gates are then connected to a single OR gate to produce the final output.
Circuit Operation
To illustrate the operation, let's consider the case where . The AND gate associated with input will have two of its inputs set to 1. The third input of this gate is connected to . The other three AND gates will have at least one input set to 0, resulting in their outputs being 0. The OR gate will then output the value of , thus providing a path from the selected input to the output.
The 4-to-1-line multiplexer effectively has six inputs (four data inputs and two selection inputs) and one output. A truth table describing all possible input combinations would require 64 rows, as six input variables can produce combinations. However, this is impractical for documentation purposes. Instead, we use a function table to describe the operation of the multiplexer more conveniently.
Function Table
The function table for the 4-to-1 multiplexer is shown below:
Output | ||
---|---|---|
0 | 0 | |
0 | 1 | |
1 | 0 | |
1 | 1 |
When the selection inputs are , output is equal to input . When the selection inputs are , input is directed to output , and similarly for the other two combinations.
Multiplexer as a Data Selector
A multiplexer is also called a data selector because it selects one of many data inputs and routes the binary information to the output. The AND gates and inverters in the multiplexer resemble a decoder circuit, as they decode the input selection lines. Generally, a -to-1-line multiplexer is constructed from an -to- decoder by adding input lines, one from each data input.
The size of the multiplexer is specified by the number of its data inputs () and the single output. It is implied that it also contains selection lines.
Enable Input
Multiplexers may have an enable input to control their operation. When the enable input is in the inactive state, the outputs are disabled. When it is active, the circuit functions as a normal multiplexer. The enable input is useful for expanding two or more multiplexers into a larger multiplexer with more inputs.
Quadruple 2-to-1-Line Multiplexer
In some cases, multiple multiplexers are integrated into a single circuit. For example, a quadruple 2-to-1-line multiplexer consists of four 2-to-1 multiplexers. Each multiplexer can select one of two input lines. The selection and enable inputs are common to all multiplexers.
The circuit has four multiplexers, each capable of selecting one of two input lines. Output can be selected to come from either input or . Similarly, output may have the value of or , and so on. One input selection line selects one of the lines in each of the four multiplexers. The enable input must be active for normal operation.
Function Table
The function table for the quadruple 2-to-1-line multiplexer is shown below:
Enable | Select | Outputs () |
---|---|---|
0 | X | All outputs are 0 (disabled) |
1 | 0 | (for ) |
1 | 1 | (for ) |
When the enable input is 1, the circuit operates as expected. If , the four inputs are directed to the outputs. If , the four inputs are directed to the outputs. If the enable input is 0, all outputs are 0 regardless of the value of .