Multiplexers, Decoders, and Encoders

Multiplexers, Decoders, and Encoders

Multiplexers

  • A multiplexer, or mux, is a combinational circuit that selects binary information from one of many input lines and directs it to a single output line.
  • It works like a digitally controlled multi-way switch where the binary data from multiple input lines is directed to a single output.
  • The selection of a particular input line is controlled by a set of selection lines. Typically, a multiplexer with n selection lines has 2^n input lines.
  • A multiplexer is commonly used in data routing, communication, data processing and transmission applications.
  • The reverse of a multiplexer is a demultiplexer, which takes a single input line and routes it to one of multiple output lines.
  • An important use of multiplexers is in implementing Boolean functions, which can be done by storing the function’s truth table in the multiplexer’s data inputs.

Decoders

  • A decoder is a combinational circuit that converts binary information from n encoded inputs to a maximum of 2^n unique outputs.
  • They are used in a variety of devices and applications, such as data multiplexing, memory address decoding, and 7-segment displays.
  • A key use for decoders is in demultiplexing applications where data needs to be routed from one line to one of many lines.
  • With the addition of enable inputs, we can control whether the decoder is active or not, adding further versatility to its uses.
  • Apart from their use in digital systems, decoder circuits are also widely used in communication systems for error detection and correction.

Encoders

  • An encoder is a combinational circuit that converts information from one format to another. Specifically, it converts multiple inputs into a binary code.
  • It performs the inverse operation of a decoder, taking 2^n or fewer number of inputs, and encoding it into an n-bit code.
  • An encoder has 2^n (or fewer) input lines, and n output lines. From this, it can generate a binary code corresponding to the input value.
  • Encoders are used in a number of different types of applications, including data compression, error detection and correction schemes, and in the generation of parity bits in parity check codes.
  • Encoders can be categorised as either priority encoders or non-priority encoders depending on how they handle inputs.
  • A limitation of encoders is that they consider all inputs equally likely. They tend to be less efficient when the input probabilities are not equal. If the inputs have unequal probabilities, a more efficient encoding method can be achieved with Huffman coding.