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
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).
| Pin | Name | Type | What it is |
|---|---|---|---|
| 1 | 4′ | Input | Input, active-low |
| 2 | 5′ | Input | Input, active-low |
| 3 | 6′ | Input | Input, active-low |
| 4 | 7′ | Input | Input, active-low |
| 5 | EI′ | Input | Input, active-low |
| 6 | A2′ | Output | Totem-pole output, active-low |
| 7 | A1′ | Output | Totem-pole output, active-low |
| 8 | GND | Ground | 0 V |
| 9 | A0′ | Output | Totem-pole output, active-low |
| 10 | 0′ | Input | Input, active-low |
| 11 | 1′ | Input | Input, active-low |
| 12 | 2′ | Input | Input, active-low |
| 13 | 3′ | Input | Input, active-low |
| 14 | GS′ | Output | Totem-pole output, active-low |
| 15 | EO′ | Output | Totem-pole output, active-low |
| 16 | VCC | Power | +5 V supply |
74LS148 function table
| Highest input low | A2′ | A1′ | A0′ | GS′ | EO′ |
|---|---|---|---|---|---|
| none | 1 | 1 | 1 | 1 | 0 |
| 7′ | 0 | 0 | 0 | 0 | 1 |
| 6′ | 0 | 0 | 1 | 0 | 1 |
| 5′ | 0 | 1 | 0 | 0 | 1 |
| 4′ | 0 | 1 | 1 | 0 | 1 |
| 3′ | 1 | 0 | 0 | 0 | 1 |
| 2′ | 1 | 0 | 1 | 0 | 1 |
| 1′ | 1 | 1 | 0 | 0 | 1 |
| 0′ | 1 | 1 | 1 | 0 | 1 |
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
| Package | 16-pin DIP |
| Supply voltage | 5 V (4.75 V to 5.25 V) |
| Output type | Totem-pole — drives both high and low |
| Output current, low | sinks up to 8 mA |
| Output current, high | sources up to 0.4 mA |
| Input current, low | 0.4 mA out of each input held low |
| Fan-out | one 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.