74LS138 3-to-8 line decoder, active-low

The 74LS138 is a 3-to-8 line decoder. The three select inputs C B A choose one of eight active-low outputs, Y0′ to Y7′, and that output goes low while the other seven stay high. It has three enable inputs — G1 must be high and both G2A′ and G2B′ low — otherwise every output stays high.

74LS138 pinout

VCCAY0′BY1′CY2′G2A′Y3′G2B′Y4′G1Y5′Y7′Y6′GND1611521431341251161079874LS138

Top view of the 16-pin DIP package. Pin 1 is at the bottom left, beside the notch, and the numbers run anticlockwise. Power is on pin 16 (VCC, +5 V) and pin 8 (GND).

PinNameTypeWhat it is
1AInputInput
2BInputInput
3CInputInput
4G2A′InputInput, active-low
5G2B′InputInput, active-low
6G1InputInput
7Y7′OutputTotem-pole output, active-low
8GNDGround0 V
9Y6′OutputTotem-pole output, active-low
10Y5′OutputTotem-pole output, active-low
11Y4′OutputTotem-pole output, active-low
12Y3′OutputTotem-pole output, active-low
13Y2′OutputTotem-pole output, active-low
14Y1′OutputTotem-pole output, active-low
15Y0′OutputTotem-pole output, active-low
16VCCPower+5 V supply

74LS138 truth table

74LS138 truth table, enabled (G1 = 1, G2A′ = G2B′ = 0)
CBAY0′Y1′Y2′Y3′Y4′Y5′Y6′Y7′
00001111111
00110111111
01011011111
01111101111
10011110111
10111111011
11011111101
11111111110

What the 74LS138 is used for

  • Address decoding: one chip-select line out of eight
  • Implementing any three-variable function, by combining the minterm outputs it needs with a NAND gate
  • A 1-to-8 demultiplexer, by feeding data into an enable input
  • Building a 4-to-16 decoder from two 138s

Every output is one minterm of C B A, inverted — so any function of three variables is one 138 and a NAND of the minterms it needs.

Electrical summary

Package16-pin DIP
Supply voltage5 V (4.75 V to 5.25 V)
Supply current, typical6.3 mA
Output typeTotem-pole — drives both high and low
Output current, lowsinks up to 8 mA
Output current, highsources up to 0.4 mA
Input current, low0.4 mA out of each input held low
Fan-outone output can drive about 20 LS inputs

Typical figures for quick reference when planning a board. Check the manufacturer's datasheet for limits and timing before committing a design. The 74HC138 and 74HCT138 use the same pin numbers, with different electrical values.

Try the 74LS138 on a breadboard

The Breadboard Simulator has the 74LS138 in its parts library: seat it on a virtual breadboard, wire it, power the board and probe the pins before you build the real thing.

Related chips

Build it before you build it.

Seat real 74-series chips on a virtual breadboard, wire them and probe every pin.