74LS148 8-to-3 line priority encoder

The 74LS148 is a priority encoder: of its eight active-low inputs, it reports the number of the highest one that is low, as a 3-bit code on A2′ A1′ A0′ — inverted, so input 7 gives 000. GS′ goes low when any input is active, and EO′ goes low when none is, which is how two chips are cascaded for sixteen inputs.

74LS148 pinout

VCC4′EO′5′GS′6′3′7′2′EI′1′A2′0′A1′A0′GND1611521431341251161079874LS148

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
14′InputInput, active-low
25′InputInput, active-low
36′InputInput, active-low
47′InputInput, active-low
5EI′InputInput, active-low
6A2′OutputTotem-pole output, active-low
7A1′OutputTotem-pole output, active-low
8GNDGround0 V
9A0′OutputTotem-pole output, active-low
100′InputInput, active-low
111′InputInput, active-low
122′InputInput, active-low
133′InputInput, active-low
14GS′OutputTotem-pole output, active-low
15EO′OutputTotem-pole output, active-low
16VCCPower+5 V supply

74LS148 function table

74LS148 function table (EI′ = 0)
Highest input lowA2′A1′A0′GS′EO′
none11110
7′00001
6′00101
5′01001
4′01101
3′10001
2′10101
1′11001
0′11101

With EI′ high the chip is disabled and every output is 1.

What the 74LS148 is used for

  • Encoding a keypad or a set of buttons into a binary code
  • Interrupt priority logic
  • Analog-to-digital flash converters

Electrical summary

Package16-pin DIP
Supply voltage5 V (4.75 V to 5.25 V)
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 74HC148 and 74HCT148 use the same pin numbers, with different electrical values.

The 74LS148 and the Breadboard Simulator

The 74LS148 is not in the Breadboard Simulator's parts library yet — this page is a reference. The simulator seats the gates, decoders, multiplexers, adders and buffers marked on the chips page, so the logic around a 74LS148 can be planned and wired there.

Related chips

Build it before you build it.

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