74LS147 10-to-4 line priority encoder (decimal to BCD)
The 74LS147 encodes nine active-low decimal inputs, 1′ to 9′, into a BCD code on D′ C′ B′ A′. It reports the highest input that is low, and its outputs are inverted: input 9 gives 0110, the complement of 1001. With no input low, it gives 1111, which stands for 0.
74LS147 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 | 8′ | Input | Input, active-low |
| 6 | C′ | Output | Totem-pole output, active-low |
| 7 | B′ | Output | Totem-pole output, active-low |
| 8 | GND | Ground | 0 V |
| 9 | A′ | Output | Totem-pole output, active-low |
| 10 | 9′ | Input | Input, active-low |
| 11 | 1′ | Input | Input, active-low |
| 12 | 2′ | Input | Input, active-low |
| 13 | 3′ | Input | Input, active-low |
| 14 | D′ | Output | Totem-pole output, active-low |
| 15 | NC | — | Not connected |
| 16 | VCC | Power | +5 V supply |
74LS147 function table
| Highest input low | D′ | C′ | B′ | A′ |
|---|---|---|---|---|
| none | 1 | 1 | 1 | 1 |
| 9′ | 0 | 1 | 1 | 0 |
| 8′ | 0 | 1 | 1 | 1 |
| 7′ | 1 | 0 | 0 | 0 |
| 6′ | 1 | 0 | 0 | 1 |
| 5′ | 1 | 0 | 1 | 0 |
| 4′ | 1 | 0 | 1 | 1 |
| 3′ | 1 | 1 | 0 | 0 |
| 2′ | 1 | 1 | 0 | 1 |
| 1′ | 1 | 1 | 1 | 0 |
What the 74LS147 is used for
- Encoding a decimal keypad into BCD
- Turning a ten-position switch into a 4-bit code
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 74HC147 and 74HCT147 use the same pin numbers, with different electrical values.
The 74LS147 and the Breadboard Simulator
The 74LS147 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 74LS147 can be planned and wired there.