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

# Encoder; 4×16 decoder from 2×4 decoders

Digital Logic · Chapter 4: Data Processing Circuits

- Asked in: 2076 Asoj
- 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/encoder-4x16-decoder
- Whole chapter: https://www.bctengineer.com/md/semester_3/digital_logic/chapter-4

## Question

Define encoder. Design 4×16 Decoder using 2×4 Decoder only.

## Short answer

An encoder converts 2^n input lines to n-bit binary code. A 4×16 decoder is built with five 2×4 decoders: one uses inputs A,B to enable one of four second-level decoders, each using C,D to produce 4 outputs, yielding 16 outputs.

## Answer

An **encoder** is a combinational circuit that does the reverse of a decoder: it has $2^n$ (or fewer) input lines and $n$ output lines, and gives the binary code of the input line that is active. Example: an 8-to-3 (octal-to-binary) encoder gives $Y_2Y_1Y_0 = 101$ when input $D_5$ is high.

#### 4×16 decoder using only 2×4 decoders

Inputs $A$ (MSB), $B$, $C$, $D$ (LSB). Each 2×4 decoder has an enable input $E$. **Five** 2×4 decoders are needed, in two levels.

- **First level (1 decoder):** inputs $A$, $B$. Its four outputs act as enables, selecting one of the second-level decoders.
- **Second level (4 decoders):** inputs $C$, $D$ in common. Only the enabled one gives an active output.

```text
                       +-------+
            C,D ------>| 2x4 #1|--> Y0..Y3
                  +--->| E     |
                  |    +-------+
  +--------+  O0--+    +-------+
A-|  2x4   |  O1------>| 2x4 #2|--> Y4..Y7
B-|  (#0)  |  O2--+    +-------+
E-|        |  O3-+|    +-------+
  +--------+     |+--->| 2x4 #3|--> Y8..Y11
                 |     +-------+
                 |     +-------+
                 +---->| 2x4 #4|--> Y12..Y15
                       +-------+
 (C,D go to all four second-level decoders)
```

| AB | Enabled decoder | Outputs active (by CD) |
|---|---|---|
| 00 | #1 | $Y_0$–$Y_3$ |
| 01 | #2 | $Y_4$–$Y_7$ |
| 10 | #3 | $Y_8$–$Y_{11}$ |
| 11 | #4 | $Y_{12}$–$Y_{15}$ |

**Example:** $ABCD = 1101$: decoder #0 makes O3 high, enabling #4; $CD = 01$ makes its second output high, so $Y_{13} = 1$ (since $1101_2 = 13$).

## Check yourself

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

1. What does an encoder do?
   A. Gives the binary code of the active input line (reverse of a decoder)
   B. Activates one output for each input code
   C. Selects one of many inputs onto one output
   D. Compares two binary numbers
   Answer: A. An encoder has 2^n inputs and n outputs, giving the code of the active input. (Key point: Encoder definition)

2. How many 2x4 decoders are needed for a 4x16 decoder?
   A. 4
   B. 5
   C. 8
   D. 16
   Answer: B. One first-level decoder plus four second-level decoders. (Key point: Decoder count)

3. What is the role of the first-level decoder with inputs A, B?
   A. It produces the final outputs Y0-Y15
   B. It drives C and D for the others
   C. Its outputs enable one of the second-level decoders
   D. It inverts D
   Answer: C. A,B pick which of the four second-level decoders is enabled. (Key point: Role of first level)

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

## Related in Digital Logic

- [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×
- [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
- [DEMUX vs decoder; 4×16 decoder from 2×4](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Adecoder-4x16-from-2x4) — Digital Logic, chapter 4
- [Encoder vs decoder; 8-to-3 encoder](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Aencoder-decoder-8to3) — Digital Logic, chapter 4
- [Octal priority encoder design](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Aoctal-priority-encoder-design) — Digital Logic, chapter 4, asked 3×
- [Priority encoder; "e" and "f" segments](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Apriority-encoder-e-f-segments) — Digital Logic, chapter 4

## Related in other subjects

- [Stereo FM encoder and decoder](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Astereo-fm-encoder-decoder) — Communication Systems, chapter 3, asked 2×
- [Stereo FM encoder and decoder block diagram](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Astereo-fm-encoder-decoder-blocks) — Communication Systems, chapter 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
- [Use of VHDL; decoder design](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Avhdl-use-decoder) — Embedded System, chapter 9
