IFT 211 · Digital Logic Design
Our notes
2 min readMultiplexer (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
-
Multiplexers | Combinational Logic Functions | Electronics Textbook
(opens allaboutcircuits.com in a new tab)
-
Decoder | Combinational Logic Functions | Electronics Textbook
(opens allaboutcircuits.com in a new tab)
-
Multiplexer
(opens en.wikipedia.org in a new tab)
Wikipedia, Multiplexer, CC BY-SA 4.0 · licence
-
Binary decoder
(opens en.wikipedia.org in a new tab)
Wikipedia, Binary decoder, CC BY-SA 4.0 · licence
-
NPTEL: Digital Electronic Circuits (IIT Kharagpur, Prof. Goutam Saha)
Video lectures, many hours in all: watch on Wi-Fi where you can.
(opens nptel.ac.in in a new tab)
NPTEL, NPTEL: Digital Electronic Circuits (IIT Kharagpur, Prof. Goutam Saha), CC BY-NC-SA 4.0 · licence
-
NPTEL: Digital Circuits and Systems (IIT Madras, Prof. Shankar Balachandran)
Video lectures, many hours in all: watch on Wi-Fi where you can.
(opens nptel.ac.in in a new tab)
NPTEL, NPTEL: Digital Circuits and Systems (IIT Madras, Prof. Shankar Balachandran), CC BY-NC-SA 4.0 · licence
Watch
-
Best pick Introduction to Encoders and Decoders
7 min · ≈ 32 MB · about ₦18
(opens youtube.com in a new tab)
-
Multiplexer Explained | Implementation of Boolean function using Multiplexer
23 min · ≈ 104 MB · about ₦58
(opens youtube.com in a new tab)
-
Multiplexers and Decoders
9 min · ≈ 41 MB · about ₦23
(opens youtube.com in a new tab)
-
How Combinational Logic Devices Work - The Learning Circuit
11 min · ≈ 50 MB · about ₦28
(opens youtube.com in a new tab)
-
Lecture 30 Encoders and Decoders
50 min · ≈ 225 MB · about ₦126
(opens youtube.com in a new tab)
Practise
-
Encoders and Decoders Worksheet (All About Circuits)
Questions with the answer under each one (tap "Reveal answer").
(opens allaboutcircuits.com in a new tab)
-
Multiplexers and Demultiplexers Worksheet (All About Circuits)
Questions with the answer under each one (tap "Reveal answer").
(opens allaboutcircuits.com in a new tab)
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.