Decoder: Decoding the Input
A decoder is a combinational logic circuit that turns one of several outputs ON (High) based on the logic of the inputs. Figure 7 represents a decoder in terms of combinational logic.
Figure 8 shows a truth table for this decoder. The table shows that the values of the two input signals uniquely select one of the four available output lines for actual output. It's worth noting that if we consider the input pair as a binary value, and the four output lines as the decimal values 0, 1, 2, and 3, then we can say that this circuit is a decoder, as its function is to input a binary value and output a decimal value.
In addition to decoders, combinational logic circuitry can be used to create comparators, full adders, half adders, multipliers, subtracters, barrel shifters, and other functionalities. Most of these functionalities can be implemented using only multiplexers and decoders of the type described above. Even so, circuits built from these constituents alone are likely to include redundancies and experience various other problems. These circuits must therefore be simplified and compressed.