Skip to content
BetterDL

Decoder expansion

Also called: decoder tree, cascading decoders, decoder cascade, cascaded decoders

Building a large decoder from smaller decoders with enable inputs, so the high input bits choose which small decoder is active.

Decoders get big fast: a 6-to-64 decoder needs 64 AND gates with 6 inputs each. Decoder expansion builds it from small chips instead, using their enable inputs.

The key idea: split the input code into high bits and low bits.

  • The low bits go to every small decoder. They pick a line within a decoder.
  • The high bits decide which decoder is enabled. Only one is on at a time, so the combined outputs stay one hot.

Two halves. A 3-to-8 decoder from two 2-to-4s: send B C to both. Enable the lower one with (it makes Y0–Y3) and the upper one with A (Y4–Y7).

A two-level tree. For bigger jobs, a first decoder on the high bits drives the enables of a row of second-level decoders:

  • 4-to-16 from 2-to-4s: one decoder on A B enables four decoders on C D. 1 + 4 = 5 decoders.
  • 6-to-64 from 3-to-8s: one on the top 3 bits enables eight on the low 3 bits. 1 + 8 = 9 decoders.

Memory systems use exactly this pattern: the high address bits feed a decoder whose outputs drive chip selects (depth expansion).

Worked examples

Example

Where does input 1101 land?

A 4-to-16 decoder is built as a tree: a first 2-to-4 decoder on A B, whose outputs 0–3 enable second-level decoders 0–3, each decoding C D.

  1. 1.

    Input A B C D = 1101.

  2. 2.

    First level: A B = 11 = 3, so only second-level decoder 3 is enabled.

  3. 3.

    Decoder 3 sees C D = 01 = 1, so its output 1 turns on.

  4. 4.

    Decoder 3 covers outputs 12–15, so its output 1 is overall output 12 + 1 = 13 = 1101₂. ✓

Example

Counting the chips

How many 2-to-4 decoders make a 6-to-64 decoder as a three-level tree?

  1. 1.

    Level 1 decodes the top 2 bits: 1 decoder with 4 outputs.

  2. 2.

    Level 2: each of those 4 outputs enables a decoder for the next 2 bits: 4 decoders, 16 outputs.

  3. 3.

    Level 3: each of those 16 outputs enables a decoder for the last 2 bits: 16 decoders, 64 outputs.

  4. 4.

    Total: 1 + 4 + 16 = 21 decoders.

Common mistakes

  • Putting the low bits on the enables. The high bits choose the decoder; the low bits go to every decoder.

  • Forgetting the first-level decoder in the count. A 4-to-16 tree of 2-to-4s uses 5 decoders, not 4.

  • Enabling two decoders at once. Then two outputs are 1 and the result is no longer one-hot.

Practice Decoder expansion

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Decoder expansion is taught in Combinational Logic and Memory.