Combinational logic is often group into larger building blocks to build more complex systems.
Multiplexers
Multiplexers are among the most commonly used combinational circuits. They choose an output from among several possible inputs based on the value of a select signal. A multiplexer is sometimes affectionately called a mux.
The multipleer chooses between two data inputes based on the setect: if , then , and if , then , is also called a control signal because it controls what the multiplexer does.
A multiplexer can be built from sum-of-products logic. The boolean equation for the multiplexer may be derived with a Karnaugh map of read off by inspection. $$Y = D_0\overline S+ D_1 \overline S.$$
Wider Multiplexers
A multiplexer has four data inputs and one output. Two select signals are needed to choose among the four data inputs. The multiplexer can be built using sum-of-product logic, tristate buffers, or multiple multiplexers.
In general, a multiplexer needs select lines. Again, the best implementation choice depends on the target technology.
Multiplexers can be used as lookup tables to perform logic functions. A multiplexer used to implement a two-input . The inputs, and , serve as select lines. The multiplexer data inputs are connected to or according to the row of the truth table. In general, a -input multiplexer can be programmed to perform any -input logic function by applying 's and 's to the appropriate data inputs.
With a little cleverness, we can cut the multiplexer size in halt, using only a -input multiplexer to perform an -input logic function. The strategy is to provide one of the literals, as well a 's and 's to the multiplexer data inputs.
Decoders
A decoder has inputs and outputs. It asserts exactly one of its outputs depending on the input combination. The outputs are called one-hot, because exactly one is 'hot' at a given time.
A simple truth table of a decoder is
0
0
0
0
0
1
0
1
0
0
1
0
1
0
0
1
0
0
1
1
1
0
0
0
And they are fairly simple to do only using and gates.
Decoders can be combined with gates to build logic functions. When using decoders to build logic, it is easiest to express functions as a truth table or in canonical sum-of-product form. An input function with 's in the truth tbale cab be built with an decoder and an -input gate attached to al the minterms containing 's in the truth table. This concept will be applied to the building of Read Only Memories (ROMs).