A decoder chip takes a binary number on its input pins and activates exactly one output line that matches that number. You connect the input pins to the binary signal you want to read, connect the enable pin so the chip turns on, and the output pin that goes high (or low) tells you which number was received. That single behavior — one input code, one active output — is the whole point of the part, and almost every practical circuit you build with a decoder is just a variation on wiring those three things correctly.
This guide covers what a decoder chip actually does, how to wire one, the difference between a decoder and an encoder, and where these parts show up in real designs. The focus is on the common 74-series logic family, since those are the chips most people meet first.
What does a decoder chip actually do?
A decoder converts a binary code into a single active output. If you feed it the binary number for 5, it turns on output line 5 and leaves the others off. That is the entire function.
The most common example is the 74HC138, a 3-to-8 line decoder. It has three address inputs and eight outputs. Those three inputs can represent eight different combinations (000 through 111), and each combination lights up exactly one of the eight outputs. Three input bits, eight possible results — that is why it is called 3-to-8.
Two details matter here and they trip people up constantly.
First, many decoders have active-low outputs. The selected output goes to 0 volts, not to the supply voltage. The 74HC138 works this way. If you expect a high signal on the chosen pin, you will think the chip is broken when it is working perfectly. Read the datasheet and confirm which state means “selected.”
Second, the chip usually has one or more enable pins. On the 74HC138 there are three: two active-low and one active-high. All three must be in their active state for any output to respond. This is not a design flaw. It is a feature that lets you stack decoders together, which comes up later.
How do you wire a decoder chip into a circuit?
Wiring a decoder comes down to four connections: power, ground, the binary inputs, and the enable pins. Get those right and the outputs do the rest.
Here is the sequence that works reliably:
- Connect the VCC pin to your supply voltage and the GND pin to ground. For 74HC parts that is typically 2 to 6 volts; for older 74LS parts it is 5 volts. Check the specific datasheet before applying power.
- Connect your binary signal to the address inputs. For a 3-to-8 decoder, that means three signal lines, one per input pin.
- Tie the enable pins to their active state. If you are not using them for anything else, hard-wire them so the chip is always enabled.
- Connect each output to whatever it controls — an LED with a resistor, another logic gate, a relay driver, or a microcontroller input.
One practical habit saves a lot of debugging. Decouple the power supply with a small capacitor placed close to the chip. Digital logic draws current in short bursts when outputs switch, and without local decoupling those bursts can cause erratic behavior that looks like a logic fault but is really a power problem.
Also remember that unused inputs should never float. A floating logic input can sit at an unpredictable voltage and cause the output to behave randomly. Tie unused inputs to a defined level, either high or low, through a resistor or directly.
What is the difference between a decoder and an encoder?
A decoder takes a binary code in and activates one output. An encoder does the reverse: it takes one active input and produces the binary code for it.
They are mirror images of each other. A 3-to-8 decoder has three inputs and eight outputs. An 8-to-3 encoder has eight inputs and three outputs, and it reports which input is active as a binary number.
The practical difference shows up in what you need. If you want to select one of eight devices based on a number your microcontroller sends, you want a decoder. If you have eight buttons and want to report which one was pressed using only three signal lines, you want an encoder.
One caveat on encoders: a basic encoder cannot handle two inputs being active at once. It produces a meaningless result. Priority encoders solve this by always reporting the highest-priority active input, and they usually add an output pin that signals whether any input is active at all. If your design can have simultaneous inputs, a priority encoder is the correct choice, not a plain encoder.
How do you combine multiple decoder chips?
You combine decoders by using the enable pins as a higher-level address line. This is the main reason those enable pins exist.
Suppose you need 16 outputs but only have 3-to-8 decoders. Two chips give you 16 outputs. Connect the three address inputs of both chips together so they always receive the same code. Then use a fourth signal line to enable one chip or the other.
When that fourth line is low, the first chip is enabled and responds to the three-bit code. The second chip is disabled and all its outputs stay inactive. When the fourth line is high, the roles swap. You now have four address bits selecting one of 16 outputs, built from two 3-to-8 parts.
This cascading approach scales. Each additional enable line you control doubles the number of outputs you can address. It is a standard technique and it is why decoder datasheets spend so much space explaining the enable logic.
Where are decoder chips used in real designs?
Decoders show up anywhere a system needs to select one thing out of many using a small number of control lines.
Memory addressing is the classic case. A processor sends an address, and decoders activate the specific memory chip or memory region that address refers to. Without decoding, the processor would have no way to talk to one chip while leaving the others alone.
I/O expansion is another common use. A microcontroller with limited pins can drive a decoder to control many peripherals while using only a few pins for the address. The decoder handles the selection; the microcontroller just sends a number.
Seven-segment displays are a familiar example, though with a twist. A BCD-to-seven-segment decoder takes a 4-bit binary-coded decimal value and drives the correct segments to show that digit. It is a decoder in the sense that it converts a code into a pattern, but the output is a display pattern rather than a single active line. This is worth knowing because people sometimes expect all decoders to behave like the 3-to-8 type, and display decoders do not.
Instruction decoding inside processors is the most complex case. The control unit decodes an instruction into the specific signals that tell each part of the processor what to do. That is the same fundamental idea — code in, specific action out — just at a much larger scale.
What are the most common mistakes when using a decoder?
Most decoder problems come down to a handful of avoidable errors. Knowing them in advance saves hours.
Expecting the wrong output polarity is the most frequent. If your chip has active-low outputs and you designed around active-high, nothing will work as intended. Check the datasheet logic table before you assume anything.
Forgetting the enable pins is a close second. A decoder with an unconnected or wrongly driven enable will appear completely dead. Verify that every enable pin is in its active state.
Leaving inputs floating causes intermittent, hard-to-reproduce faults. Tie every unused input to a defined level.
Skipping decoupling capacitors leads to glitches that look like logic errors but are actually power supply noise. Add the capacitors.
Exceeding the output current rating is a quieter problem. A logic output can typically source or sink only a small current — check the datasheet for the exact figure. Driving an LED directly without a current-limiting resistor, or driving a relay coil directly, can damage the chip. Use a transistor or driver stage for anything that draws meaningful current.
Frequently Asked Questions
What is a decoder chip used for?
A decoder chip converts a binary input code into a single active output line. It is used to select one device out of many, such as a memory chip or peripheral, using only a few control lines.
How many outputs does a 3-to-8 decoder have?
A 3-to-8 decoder has eight outputs, and exactly one is active at a time based on the three-bit input code. The 74HC138 is a common example of this type.
What is the difference between a decoder and an encoder?
A decoder takes a binary code and activates one matching output, while an encoder takes one active input and produces its binary code. They perform opposite conversions.
Why does my decoder chip have no output?
The most likely cause is an enable pin that is not in its active state, since all enable pins must be correct for any output to respond. A floating input or missing power connection can also produce the same result.

