Lab guide
Making sense of active-low: the 74LS147 encoder and 74LS42 decoder
Function tables for two chips whose inputs and outputs work on Low.
The first time you use a 74LS147 priority encoder it is easy to get stuck on "I pulled the input up to 5 V, so why does nothing happen?". In the lab we knew the outputs were active-low but missed that the inputs are selected by Low as well, and had to rewire once. A pin whose name has a bar over it (1̅, D̅) or whose symbol has a small circle is active (on) when Low.
1. 74LS147 (decimal to BCD priority encoder)
| Inputs | Pin(s) pulled Low | Outputs D C B A | Value read inverted |
|---|---|---|---|
| all High | — | 1111 | 0 |
| only input 1 Low | 11 | 1110 | 1 |
| only input 2 Low | 12 | 1101 | 2 |
| only input 3 Low | 13 | 1100 | 3 |
| only input 4 Low | 1 | 1011 | 4 |
| only input 5 Low | 2 | 1010 | 5 |
| only input 6 Low | 3 | 1001 | 6 |
| only input 7 Low | 4 | 1000 | 7 |
| only input 8 Low | 5 | 0111 | 8 |
| only input 9 Low | 10 | 0110 | 9 |
| inputs 3 and 7 both Low | 13, 4 | 1000 | 7 |
Inputs 1–9 and outputs A–D are all active-low. An output of 1111 means "nothing selected (0)", and you read the input number by inverting each output bit. If several inputs are Low, the highest number wins (priority). There is no pin for input 0. Power is VCC on pin 16 and GND on pin 8.
2. 74LS42 (BCD to decimal decoder)
| Inputs D C B A | Decimal | Outputs 0 1 2 … 9 | Output driven Low |
|---|---|---|---|
| 0000 | 0 | 0 1 1 1 1 1 1 1 1 1 | 0 (pin 1) |
| 0001 | 1 | 1 0 1 1 1 1 1 1 1 1 | 1 (pin 2) |
| 0010 | 2 | 1 1 0 1 1 1 1 1 1 1 | 2 (pin 3) |
| 0011 | 3 | 1 1 1 0 1 1 1 1 1 1 | 3 (pin 4) |
| 0100 | 4 | 1 1 1 1 0 1 1 1 1 1 | 4 (pin 5) |
| 0101 | 5 | 1 1 1 1 1 0 1 1 1 1 | 5 (pin 6) |
| 0110 | 6 | 1 1 1 1 1 1 0 1 1 1 | 6 (pin 7) |
| 0111 | 7 | 1 1 1 1 1 1 1 0 1 1 | 7 (pin 9) |
| 1000 | 8 | 1 1 1 1 1 1 1 1 0 1 | 8 (pin 10) |
| 1001 | 9 | 1 1 1 1 1 1 1 1 1 0 | 9 (pin 11) |
The inputs are ordinary active-high and only the outputs are active-low: the selected output goes Low and the rest stay High. Inputs 10–15 leave every output High. Power is VCC on pin 16 and GND on pin 8.
3. How not to get confused
- Start from the datasheet function table. A table of H and L is more reliable than the logic equations.
- Tie unused active-low inputs High (VCC). TTL usually reads a floating input as High, but it picks up noise.
- Wire test LEDs the right way round. For an active-low output, put the LED on the VCC side (VCC → resistor → LED → output) so it lights when the output is Low and "lit" means "selected". Size the resistor with the LED resistor calculator.
- In report tables, don't mix voltages (H/L) with logic values (0/1); say in the table title which one you used.
Convert between BCD and binary with the number base converter, and see the 7-segment calculator for display decoders (the 7447's outputs are active-low too).