UNIHIVE

Study Hub UNIPORT IFT 211

IFT 211 · Digital Logic Design

Multiplexers, decoders and encoders

Data selectors, demultiplexers, decoders, encoders, seven-segment drivers, and building functions with them.

Our notes

2 min read

Multiplexer (data selector)

A MUX has 2ⁿ data inputs, n select lines and one output; the select code chooses which input reaches the output.

  • 2-to-1: Y = S'I0 + SI1.
  • 4-to-1: Y = S1'S0'I0 + S1'S0I1 + S1S0'I2 + S1S0I3.

Uses: choosing between data sources on a bus, parallel-to-serial conversion.

Functions from a MUX

Any function of n variables can be made with a 2ⁿ-to-1 MUX: connect the select lines to the inputs and tie each data input to 0 or 1 from the truth table.

Worked example

Make the majority function F(A, B, C) = Σm(3, 5, 6, 7) with an 8-to-1 MUX: select lines A, B, C; data inputs I3, I5, I6, I7 = 1; the others = 0. With a 4-to-1 MUX on A and B: I0 = 0, I1 = C, I2 = C, I3 = 1. Check row A = 0, B = 1: F should be 1 only if C = 1, and I1 = C. Correct.

Demultiplexer

The reverse: one input, sent to one of 2ⁿ outputs chosen by the select lines.

Decoder

An n-to-2ⁿ decoder has n inputs and turns on exactly one of 2ⁿ outputs, the one numbered by the input code.

  • A 3-to-8 decoder (74LS138) gives the eight minterms of its inputs, so an OR gate on chosen outputs makes any 3-variable function.
  • Address decoders choose which memory chip answers.

Worked example

Using a 3-to-8 decoder, F = Σm(1, 2, 4, 7) (the sum bit of a full adder) is an OR gate on outputs 1, 2, 4 and 7.

Encoder

The reverse of a decoder: 2ⁿ inputs, n outputs giving the number of the active input. A priority encoder gives the number of the highest active input when several are on (used for keyboard and interrupt requests).

BCD to seven-segment decoder

Lights segments a to g of a display for digits 0 to 9 (74LS47 for common-anode displays). Each segment is a function of the 4 BCD inputs, minimised with K-maps using don't cares for 10 to 15.

Code converters

Circuits that change one code into another: binary to Gray (XOR gates), BCD to excess-3, binary to BCD.

Enable inputs and cascading

Enable pins let small chips be joined into bigger ones: two 3-to-8 decoders with the fourth address bit on their enables make a 4-to-16 decoder.

Exams usually ask

  • Draw a 4-to-1 MUX; implement a function with a MUX or decoder.
  • Explain priority encoders and seven-segment decoders.

Common mistake

Mixing up the decoder (one-hot outputs from a code) with the encoder (a code from one-hot inputs).

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

Practise

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All IFT 211 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.