Skip to main content

5×32 decoder using 3×8 decoders

Short answer

Use four 3×8 decoders. Connect A2A1A0 to all decoder inputs. Decode A4A3 with NOT and AND gates to generate four enable signals, each enabling one decoder. The enabled decoder outputs its 8 lines, yielding 32 outputs.

Design 5×32 line decoder using 3×8 line decoders and necessary logic gates.

A 5×32 decoder has 5 inputs A4A3A2A1A0A_4A_3A_2A_1A_0 and 32 outputs D0D_0–D31D_{31}; exactly one output is active for each input code. A 3×8 decoder (e.g. 74138) has 3 inputs, 8 outputs and an enable input E. Since 32/8=432/8 = 4, four 3×8 decoders are needed.

Design idea

  • The three low bits A2A1A0A_2A_1A_0 go to the inputs of all four decoders in parallel.
  • The two high bits A4A3A_4A_3 select which one decoder is enabled. This is done with two NOT gates and four AND gates (a 2×4 decoding of A4A3A_4A_3):
A4A_4A3A_3Enable signalDecoder enabledOutputs active
00E0=A4‾ A3‾E_0 = \overline{A_4}\,\overline{A_3}DEC 0D0D_0–D7D_7
01E1=A4‾A3E_1 = \overline{A_4}A_3DEC 1D8D_8–D15D_{15}
10E2=A4A3‾E_2 = A_4\overline{A_3}DEC 2D16D_{16}–D23D_{23}
11E3=A4A3E_3 = A_4A_3DEC 3D24D_{24}–D31D_{31}

Circuit

A4 ──┬────────[NOT]── A4'
A3 ──┼──┬─────[NOT]── A3'
     │  │
  E0 = A4'·A3'  (AND)
  E1 = A4'·A3   (AND)
  E2 = A4 ·A3'  (AND)
  E3 = A4 ·A3   (AND)

A2 A1 A0 (common to all four decoders)
     │
     ├──>+-----------+
     │   | 3x8  DEC0 |── D0 ... D7
     │   +-----------+
     │       E ── E0
     ├──>+-----------+
     │   | 3x8  DEC1 |── D8 ... D15
     │   +-----------+
     │       E ── E1
     ├──>+-----------+
     │   | 3x8  DEC2 |── D16 ... D23
     │   +-----------+
     │       E ── E2
     └──>+-----------+
         | 3x8  DEC3 |── D24 ... D31
         +-----------+
             E ── E3

Operation

For an input A4A3A2A1A0A_4A_3A_2A_1A_0, only one enable is 1, so only one decoder works; the others keep all outputs inactive. Inside that decoder, A2A1A0A_2A_1A_0 selects one of its 8 outputs. Output number = 8×(A4A3)10+(A2A1A0)108 \times (A_4A_3)_{10} + (A_2A_1A_0)_{10}.

Example: input 10110 (22): A4A3=10A_4A_3 = 10 enables DEC2 (outputs 16–23); A2A1A0=110=6A_2A_1A_0 = 110 = 6 selects its output 6, i.e. D16+6=D22D_{16+6} = D_{22}.

(With 74138 chips, the enable can instead be done using its three enable pins G1,G2A‾,G2B‾G_1, \overline{G_{2A}}, \overline{G_{2B}}, but the AND-gate method above works with any 3×8 decoder having one active-high enable.)

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Logic chapter 4 questions →