A tri-state buffer is a digital logic component that outputs a standard high or low logic level when enabled, but disconnects its output entirely (high-impedance state) when disabled, allowing multiple devices to share a single data bus without short-circuiting. Unlike a standard buffer that only understands logic 1 (HIGH) and logic 0 (LOW), a tri-state buffer introduces a third state: High-Z. In this state, the internal output MOSFETs are turned off, presenting an impedance in the megaohm range. It acts essentially like a physical disconnect switch controlled by a logic pin, electrically removing the component from the circuit while leaving it physically wired in place.
Truth Tables and Real-World IC Specifications
To understand how the logic flows, look at the standard truth table for a non-inverting tri-state buffer. The Output Enable pin (often labeled OE or active-low OE) dictates whether the input passes to the output or if the output floats.
| Input (A) | Output Enable (OE) | Output (Y) | State Description |
|---|---|---|---|
| 0 | 1 (Enabled) | 0 | Active LOW drive |
| 1 | 1 (Enabled) | 1 | Active HIGH drive |
| X (Don't Care) | 0 (Disabled) | Z | High-Impedance (Floating) |
While the logic is simple, selecting the right physical IC for your breadboard or PCB requires looking at voltage tolerances, propagation delays, and drive strength. Below is a specification comparison of common tri-state buffers you will encounter in modern and legacy designs.
| Part Number | Logic Family | Channels | VCC Range | Max I_O (per pin) | t_pd (Typical) |
|---|---|---|---|---|---|
| 74HC125 | High-Speed CMOS | 4 (Quad) | 2.0V - 6.0V | ±25 mA | 14 ns @ 5V |
| SN74LVC245A | Low-Voltage CMOS | 8 (Octal) | 1.65V - 3.6V | ±50 mA | 3.8 ns @ 3.3V |
| 74HCT125 | High-Speed TTL-Compatible | 4 (Quad) | 4.5V - 5.5V | ±25 mA | 18 ns @ 5V |
| 74AHC125 | Advanced High-Speed CMOS | 4 (Quad) | 2.0V - 5.5V | ±25 mA | 5.5 ns @ 5V |
What It Changes in a Circuit: The Math of Bus Contention
The primary reason tri-state buffers exist is to prevent bus contention—a destructive condition that occurs when two standard push-pull outputs try to drive the same wire to different logic levels simultaneously.
Imagine a shared data line connected to Device A and Device B. Device A outputs a HIGH (5V), and Device B outputs a LOW (0V). Because standard GPIO pins use push-pull MOSFETs, they have a relatively low output impedance, typically around 50Ω. When they tie together, they form a direct short circuit through the data line.
Let’s run the math on this failure mode:
- Total Resistance: 50Ω (Device A) + 50Ω (Device B) = 100Ω
- Voltage Difference: 5V - 0V = 5V
- Short-Circuit Current (Ohm's Law): I = V / R = 5V / 100Ω = 50 mA
A sustained 50 mA current through a standard 74HC125 output pin vastly exceeds its recommended continuous operating current (usually 6 mA to 8 mA for reliable logic levels) and pushes right up against the absolute maximum rating of 25 mA. This causes localized silicon heating, severe voltage sag on the VCC rail (potentially triggering brownout resets in nearby microcontrollers), and eventual thermal destruction of the output driver.
The tri-state buffer changes this dynamic entirely. When Device B is disabled via its OE pin, its output impedance jumps from 50Ω to >10 MΩ. The current drops from 50 mA down to a fraction of a microamp, safely isolating Device B while Device A drives the bus unimpeded.
Where You Meet Tri-State Buffers in Practice
You will rarely see a single tri-state buffer used in isolation. They are almost always deployed in arrays to manage parallel data paths or shared communication lines.
Memory Address and Data Buses
In older microcomputer architectures and modern FPGA designs, SRAM and DRAM chips share a common 8-bit or 16-bit data bus. Tri-state buffers (like the octal 74LVC245) sit between the memory chip and the microcontroller. The memory chip only enables its output buffers during a READ cycle; during a WRITE cycle, it enters High-Z so the microcontroller can drive the data lines.
SPI Bus Multiplexing
While SPI devices use Chip Select (CS) lines to ignore incoming clocks, some poorly designed sensors or legacy peripherals do not properly tri-state their MISO (Master In Slave Out) pins when deselected. If you have three sensors on one SPI bus and they all drive MISO constantly, you need a tri-state buffer (like a 74HC125) on each sensor’s MISO line, gated by the CS signal, to ensure only the active sensor talks to the master.
A common bench mistake is disabling a tri-state buffer (putting the output in High-Z) but leaving the input pin unconnected. In CMOS logic, a floating input drifts into the linear region, turning on both the internal PMOS and NMOS transistors simultaneously. This creates a 'shoot-through' current path directly from VCC to GND. The chip will draw massive quiescent current (
I_CC), overheat, and potentially fail, even though the output is technically disconnected. Always tie unused or switched inputs to GND or VCC via a 10 kΩ pull-down/pull-up resistor.
Tri-State vs. Open-Drain: Clearing Up the Confusion
The most common point of confusion for hobbyists and junior engineers is mixing up tri-state outputs with open-drain (or open-collector) outputs. While both can 'disconnect' from the bus, they do so in fundamentally different ways.
- Open-Drain: Can actively pull the line LOW (connect to GND) or float (High-Z). It cannot actively drive HIGH. To achieve a HIGH logic level, an external pull-up resistor is required. This allows for 'wired-AND' logic, which is why the I2C protocol relies on open-drain outputs. Multiple devices can pull the line low without shorting each other out.
- Tri-State: Can actively drive HIGH (connect to VCC), actively drive LOW (connect to GND), or float (High-Z). It does not require pull-up resistors to achieve a HIGH state. This is required for high-speed parallel buses and SPI protocols where fast edge rates and strong active drive are necessary to overcome parasitic capacitance on long traces.
If you try to use a tri-state buffer to mimic an I2C bus without careful enable/disable timing, you risk bus contention the moment two devices try to talk. Conversely, if you try to run a high-speed SPI bus using open-drain pull-ups, your signal rise times will be too slow, resulting in corrupted data and failed clock edges.
Frequently Asked Questions
Can I use a tri-state buffer to multiplex analog signals?
No. Tri-state buffers are designed for digital logic thresholds. If you pass an analog waveform (like audio or a sensor voltage) through a digital buffer, it will clip and distort the signal into a square wave. For analog multiplexing, use dedicated analog switches or multiplexers like the CD4051 or 74HC4051, which use transmission gates to pass continuous voltages.
What happens if two tri-state buffers are enabled at the exact same time?
You get bus contention. The High-Z protection only works if the system designer ensures that only one buffer's Output Enable pin is active at any given microsecond. In high-speed designs, engineers must account for the propagation delay (t_pd) of the enable pin to ensure one buffer fully enters High-Z before the next buffer turns on, preventing a brief but destructive short-circuit known as 'bus fighting'.






