CircuitNote

Quick electronics calculators for lab work and circuit design. Free, no sign-up, works in your browser.

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.

In this guide 3

1. 74LS147 (decimal to BCD priority encoder)

InputsPin(s) pulled LowOutputs D C B AValue read inverted
Inputsall HighPin(s) pulled Low—Outputs D C B A1111Value read inverted0
Inputsonly input 1 LowPin(s) pulled Low11Outputs D C B A1110Value read inverted1
Inputsonly input 2 LowPin(s) pulled Low12Outputs D C B A1101Value read inverted2
Inputsonly input 3 LowPin(s) pulled Low13Outputs D C B A1100Value read inverted3
Inputsonly input 4 LowPin(s) pulled Low1Outputs D C B A1011Value read inverted4
Inputsonly input 5 LowPin(s) pulled Low2Outputs D C B A1010Value read inverted5
Inputsonly input 6 LowPin(s) pulled Low3Outputs D C B A1001Value read inverted6
Inputsonly input 7 LowPin(s) pulled Low4Outputs D C B A1000Value read inverted7
Inputsonly input 8 LowPin(s) pulled Low5Outputs D C B A0111Value read inverted8
Inputsonly input 9 LowPin(s) pulled Low10Outputs D C B A0110Value read inverted9
Inputsinputs 3 and 7 both LowPin(s) pulled Low13, 4Outputs D C B A1000Value read inverted7

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 ADecimalOutputs 0 1 2 … 9Output driven Low
Inputs D C B A0000Decimal0Outputs 0 1 2 … 90 1 1 1 1 1 1 1 1 1Output driven Low0 (pin 1)
Inputs D C B A0001Decimal1Outputs 0 1 2 … 91 0 1 1 1 1 1 1 1 1Output driven Low1 (pin 2)
Inputs D C B A0010Decimal2Outputs 0 1 2 … 91 1 0 1 1 1 1 1 1 1Output driven Low2 (pin 3)
Inputs D C B A0011Decimal3Outputs 0 1 2 … 91 1 1 0 1 1 1 1 1 1Output driven Low3 (pin 4)
Inputs D C B A0100Decimal4Outputs 0 1 2 … 91 1 1 1 0 1 1 1 1 1Output driven Low4 (pin 5)
Inputs D C B A0101Decimal5Outputs 0 1 2 … 91 1 1 1 1 0 1 1 1 1Output driven Low5 (pin 6)
Inputs D C B A0110Decimal6Outputs 0 1 2 … 91 1 1 1 1 1 0 1 1 1Output driven Low6 (pin 7)
Inputs D C B A0111Decimal7Outputs 0 1 2 … 91 1 1 1 1 1 1 0 1 1Output driven Low7 (pin 9)
Inputs D C B A1000Decimal8Outputs 0 1 2 … 91 1 1 1 1 1 1 1 0 1Output driven Low8 (pin 10)
Inputs D C B A1001Decimal9Outputs 0 1 2 … 91 1 1 1 1 1 1 1 1 0Output driven Low9 (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.

Try it: read the active-low pins

Each pin shows its H or L level. Pins with a bubble are active low.

Inputs (pressed = Low)

Input
none
Outputs
DCBA HHHH
Value (decimal)
0

Things to try: on the 74LS147 press several inputs at once; only the highest number comes out (priority). DCBA is inverted BCD, so read H as 0. Give the 74LS42 10 or more and every output stays High.

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).