Skip to main content

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

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.

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

DEMUX vs decoder

PointDemultiplexerDecoder
Inputs1 data + nn select linesnn code inputs (+ enable)
Outputs2n2^n2n2^n
JobRoutes the data bit to one outputActivates the output for the input code
Output valueEquals the data inputFixed active level (1 or 0)
Typical useData distributionAddress 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 ABCDA B C D (AA = MSB) and outputs Y0Y_0–Y15Y_{15}. Use five 2×4 decoders:

  • Decoder 0 (control): inputs A,BA, B; enable tied to 1 (or to an overall enable EE). Its outputs O0O_0–O3O_3 enable one of the four output decoders.
  • Decoders 1–4: inputs C,DC, D; each enable comes from one output of decoder 0. Each produces four of the final outputs.
        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: O0→O_0 \to DEC1, O1→O_1 \to DEC2, O2→O_2 \to DEC3, O3→O_3 \to DEC4 (all enables).

ABEnabled decoderOutputs for CD = 00…11
00DEC1Y0Y_0–Y3Y_3
01DEC2Y4Y_4–Y7Y_7
10DEC3Y8Y_8–Y11Y_{11}
11DEC4Y12Y_{12}–Y15Y_{15}

Working

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

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Logic chapter 4 questions →