← Back to quizzesFree quiz

Encoders, Multiplexers and Demultiplexers

Encoders, multiplexers (MUX), and demultiplexers (DEMUX) are fundamental building blocks in digital electronics. They are used to convert data formats, select signals, and route information…

10 questions~5 min
Encoders, Multiplexers and Demultiplexers — Qwi
0 / 10
Score: 0%
1

In a 4-to-2 priority encoder, which input determines the output when both D2 and D3 are high?

2

What Boolean expression correctly represents the output Y of a 2‑to‑1 multiplexer?

3

When all inputs of a normal 8‑to‑3 encoder are low, what additional output is used to indicate this condition?

4

For a decimal‑to‑BCD encoder, how many input lines are required and how many output lines are produced?

5

In a 4‑to‑2 priority encoder, which Boolean expression gives the valid output V?

6

An 8‑to‑1 multiplexer can be built using how many 4‑to‑1 multiplexers and what additional logic?

7

Which truth table entry correctly reflects the output of a 1‑to‑2 demultiplexer when the select line S is 1 and input I is 0?

8

When multiple inputs are high in a normal encoder, what type of encoder resolves the ambiguity?

9

For a 4‑to‑2 encoder, the Boolean expression for output A is A = D2 + D3. Which input combination will set A to 1 while B remains 0?

10

What is the minimum number of selection lines required for a 16‑input multiplexer?

Introduction to Encoders, Multiplexers, and Demultiplexers

Encoders, multiplexers (MUX), and demultiplexers (DEMUX) are fundamental building blocks in digital electronics. They are used to convert data formats, select signals, and route information efficiently. This course explains the concepts, typical configurations, and Boolean equations that govern their operation, using the quiz questions as learning milestones.

1. Understanding Encoders

1.1 What Is an Encoder?

An encoder converts an active input line into a binary code on its output lines. A simple n‑to‑m encoder has n input lines and m = log₂n output lines. When exactly one input is high, the output represents the binary index of that input.

1.2 Priority Encoders

When more than one input can be high, a priority encoder resolves the conflict by assigning a hierarchy to the inputs. The highest‑priority input determines the output regardless of lower‑priority signals.

  • Example: In a 4‑to‑2 priority encoder, input D3 has higher priority than D2, D1, and D0.

Quiz Insight: The question "In a 4‑to‑2 priority encoder, which input determines the output when both D2 and D3 are high?" reinforces that D3 takes priority, producing A=1 and B=1.

1.3 Valid (V) Output

Many encoders include a valid or enable output, often labeled V

V = D0 + D1 + D2 + D3

This expression ensures that V is high when at least one input is high, and low when all inputs are low.

1.4 Special Encoders

Other encoder types include:

  • Decimal‑to‑BCD Encoder: Converts a decimal digit (0‑9) into a 4‑bit Binary‑Coded Decimal (BCD) representation. It requires 10 input lines (one for each decimal digit) and produces 4 output lines.
  • Self‑Checking Encoder: Detects illegal input combinations but is less common than priority encoders for conflict resolution.

2. Multiplexers (MUX)

2.1 Basic Operation

A multiplexer selects one of many data inputs and forwards it to a single output line. The selection is controlled by select lines. The most common form is a 2‑to‑1 MUX, which uses one select line (S) to choose between inputs D0 and D1.

The correct Boolean expression for the output Y of a 2‑to‑1 MUX is:

Y = ¬S·D0 + S·D1

This equation reflects that when S = 0, the output follows D0; when S = 1, it follows D1.

2.2 Building Larger MUXes

Complex multiplexers can be constructed from smaller ones. For instance, an 8‑to‑1 MUX can be built using two 4‑to‑1 multiplexers and an additional selection line that decides which 4‑to‑1 block is active.

Implementation steps:

  • Use two 4‑to‑1 MUXes to handle inputs D0‑D3 and D4‑D7.
  • Introduce a higher‑order select line (e.g., S2) to choose between the two 4‑to‑1 blocks.
  • Combine the outputs of the two blocks with a final 2‑to‑1 MUX controlled by S2.

This hierarchical approach reduces wiring complexity and leverages existing components.

3. Demultiplexers (DEMUX)

3.1 Basic Operation

A demultiplexer performs the inverse function of a multiplexer: it takes a single data input and routes it to one of many output lines based on select signals. A 1‑to‑2 DEMUX uses one select line (S) and produces two outputs (D0 and D1).

When the input I is low (0), both outputs are low regardless of the select line. The quiz question confirms this behavior: "When S = 1 and I = 0, D1 = 0 and D0 = 0."

3.2 Truth Table Example

Below is the truth table for a 1‑to‑2 DEMUX:

  • S = 0, I = 1 → D0 = 1, D1 = 0
  • S = 1, I = 1 → D0 = 0, D1 = 1
  • I = 0 (any S) → D0 = 0, D1 = 0

4. Practical Design Considerations

4.1 Handling Invalid or Idle States

In normal encoders, when all inputs are low, the valid output V goes low to indicate an idle condition. Designers often add a pull‑down resistor or a dedicated "valid" line to avoid undefined output states.

4.2 Choosing Between Encoder Types

If multiple inputs may be high simultaneously, a priority encoder is preferred because it resolves ambiguity by design. In contrast, a simple (non‑priority) encoder would produce undefined or erroneous outputs.

4.3 Cascading and Scaling

Both multiplexers and demultiplexers can be scaled by cascading smaller units. This modular approach simplifies PCB layout and allows reuse of standard IC families (e.g., 74HC151 for 8‑to‑1 MUX, 74HC138 for 3‑to‑8 decoder).

5. Summary of Key Equations and Concepts

  • Priority Encoder Output (4‑to‑2): If D3 = 1, A = 1, B = 1 (highest priority).
  • Valid Output (Encoder): V = D0 + D1 + D2 + D3.
  • 2‑to‑1 MUX Output: Y = ¬S·D0 + S·D1.
  • 8‑to‑1 MUX Construction: Two 4‑to‑1 MUXes + one higher‑order select line.
  • 1‑to‑2 DEMUX Behavior: When I = 0, both outputs are 0 regardless of S.
  • Decimal‑to‑BCD Encoder: 10 inputs, 4 outputs.

Understanding these relationships equips you to design reliable digital systems, from simple data routing to complex microcontroller interfacing.