Important logical functions

The basic logic gates seen in the previous section allow us to construct any combinatorial logical function. In this section, we will introduce some commonly used functions.

The multiplexer

A multiplexer 1 with inputs is a logical function whose output is equal to one of its inputs. The choice among the inputs is made through a particular selection input.

Two Input Multiplexer

The simplest multiplexer is the two-input multiplexer. The following symbol is used for this function:

circuit symbol for the 2-MUX

If the input is , the output of the multiplexer will be equal to the value presented on the input . Similarly, if is , the output will be equal to the value presented on the input .

The truth table of the two-input multiplexer is as follows:

The behavior of this multiplexer can also be described by the following equation:

N-input multiplexer

We can generalize and have multiplexers with inputs. In this case, it requires selection inputs in order to choose among one of the inputs.

For example, the 4-input multiplexer:

circuit symbol for the 4-MUX

whose equation is:

This multiplexer can be constructed using three 2-input multiplexers as follows:

building a 4-MUX from three 2-MUXes

The Decoder

A decoder is a logic function with inputs and outputs 2 among which one, and only one, output is , the index of this active output being the value present on the input, considered as a integer encoded on bits (see Natural numbers about the representation of natural numbers).

Example: 2 to 4 Decoder

The truth table for the 2 to 4 decoder is:

The logic equations of the outputs are as follows:

1

Sometimes also called a switch function

2

We also use the terminology to decoder, example: 2 to 4 decoder