---
title: "DEMUX vs decoder; 4×16 decoder from 2×4"
subject: "Digital Logic"
chapter: 4
key: "semester_3/digital_logic:decoder-4x16-from-2x4"
source: https://www.bctengineer.com/q/semester_3/digital_logic/decoder-4x16-from-2x4
site: BCT Engineering
---

# DEMUX vs decoder; 4×16 decoder from 2×4

Digital Logic · Chapter 4: Data Processing Circuits

- Asked in: 2081 Baisakh, 2+5 marks
- Video: [4*16 decoder design using 2*4 decoder](https://www.youtube.com/watch?v=_xCZ21Z3sQo) — Dr. Dhiman (Learn the art of problem solving) 
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_3/digital_logic/decoder-4x16-from-2x4
- Whole chapter: https://www.bctengineer.com/md/semester_3/digital_logic/chapter-4

## Question

Differentiate between de-multiplexer and decoder. Construct 4×16 line decoder using 2×4 line decoders with enable.

## Short answer

A demux has a data input plus select lines, output equals data; a decoder only selects one output based on code (fixed active level). A 4×16 decoder is built with five 2×4 decoders: the first decoder (A,B) enables one of four output decoders (C,D), each producing four outputs.

## Answer

#### DEMUX vs decoder

| Point | Demultiplexer | Decoder |
|---|---|---|
| Inputs | 1 data + $n$ select lines | $n$ code inputs (+ enable) |
| Outputs | $2^n$ | $2^n$ |
| Job | Routes the data bit to one output | Activates the output for the input code |
| Output value | Equals the data input | Fixed active level (1 or 0) |
| Typical use | Data distribution | Address decoding, code conversion |

A decoder with enable becomes a DEMUX when the enable pin is used as the data input; e.g. 74138 serves both roles.

#### 4×16 decoder from 2×4 decoders with enable

A 4×16 decoder has inputs $A B C D$ ($A$ = MSB) and outputs $Y_0$–$Y_{15}$. Use **five** 2×4 decoders:

- **Decoder 0 (control):** inputs $A, B$; enable tied to 1 (or to an overall enable $E$). Its outputs $O_0$–$O_3$ enable one of the four output decoders.
- **Decoders 1–4:** inputs $C, D$; each enable comes from one output of decoder 0. Each produces four of the final outputs.

```text
        A B                     C D
     +--------+             +--------+
 E ->|E    O0 |------------>|E DEC1  |--> Y0 .. Y3
     |     O1 |---------+   +--------+
     | DEC0   |         |   +--------+
     |     O2 |------+  +-->|E DEC2  |--> Y4 .. Y7
     |     O3 |---+  |      +--------+
     +--------+   |  |      +--------+
                  |  +----->|E DEC3  |--> Y8 .. Y11
                  |         +--------+
                  |         +--------+
                  +-------->|E DEC4  |--> Y12 .. Y15
                            +--------+
   (C, D go to all of DEC1 - DEC4)
```

Connections: $O_0 \to$ DEC1, $O_1 \to$ DEC2, $O_2 \to$ DEC3, $O_3 \to$ DEC4 (all enables).

| AB | Enabled decoder | Outputs for CD = 00…11 |
|---|---|---|
| 00 | DEC1 | $Y_0$–$Y_3$ |
| 01 | DEC2 | $Y_4$–$Y_7$ |
| 10 | DEC3 | $Y_8$–$Y_{11}$ |
| 11 | DEC4 | $Y_{12}$–$Y_{15}$ |

#### Working

Input $ABCD = 1101$: decoder 0 sees $AB = 11$ and enables DEC4 only; DEC4 decodes $CD = 01$ and makes its second output high, i.e. $Y_{13}$. The disabled decoders keep all their outputs at 0, so exactly one of the 16 lines is active, giving $Y_k = m_k(A,B,C,D)$.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is a key difference between a demultiplexer and a decoder?
   A. A decoder has a data input; a demux does not
   B. A demux has a data input plus selects and passes the data to one output; a decoder only decodes an input code
   C. They are identical in all respects
   D. A demux has fewer outputs
   Answer: B. A demux routes data to one output; a decoder activates the line for the input code. (Key point: DEMUX vs decoder)

2. How many 2x4 decoders are needed for a 4x16 decoder?
   A. 4
   B. 3
   C. 5
   D. 8
   Answer: C. One control decoder plus four output decoders. (Key point: Number of decoders)

3. What does decoder 0 do?
   A. Takes C,D and drives Y0-Y3
   B. Generates all 16 outputs
   C. Inverts the inputs
   D. Takes A,B and its outputs enable one of four output decoders
   Answer: D. O0-O3 are tied to the enables of DEC1-DEC4 so only one group works. (Key point: Control decoder)

4. For ABCD = 1101 which output is active?
   A. Y13
   B. Y11
   C. Y7
   D. Y14
   Answer: A. AB = 11 enables DEC4 (Y12-Y15) and CD = 01 picks its second output, Y13. (Key point: Worked example)

## Related in Digital Logic

- [Multiplexer tree; 1:16 DEMUX from 1:4](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Ademux-tree-1to16-from-1to4) — Digital Logic, chapter 4
- [Encoder; 4×16 decoder from 2×4 decoders](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Aencoder-4x16-decoder) — Digital Logic, chapter 4
- [Decoder; 3×8 decoder from two 2×4 decoders](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Adecoder-3x8-from-2x4) — Digital Logic, chapter 4
- [5×32 decoder using 3×8 decoders](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Adecoder-5x32-from-3x8) — Digital Logic, chapter 4, asked 3×
- [DEMUX vs decoder; seven-segment "b" segment](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Ademux-decoder-b-segment) — Digital Logic, chapter 4
- [Multiplexer tree; 16:1 MUX from 4:1](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Amux-16to1-from-4to1) — Digital Logic, chapter 4

## Related in other subjects

- [Inductance of twin-bundle line, 16 mm radius](https://www.bctengineer.com/question.md?key=semester_4%2Fpower_system_analysis_i%3Atwin-bundle-150km-16mm) — Power System Analysis I, chapter 4, asked 3×
- [Delta modulation encoder/decoder; PCM vs DM](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Adm-encoder-decoder-pcm-vs-dm) — Communication Systems, chapter 4
- [Uniform vs non-uniform quantization; 16-level PCM numerical](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Auniform-nonuniform-16-level-pcm) — Communication Systems, chapter 4
- [8255 port addresses from decoder figure](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Appi-port-addresses-decoder-fig) — Instrumentation II, chapter 2
