Open-Drain Outputs and Wire-AND Logic: How Hardware Lets Multiple Drivers Share a Wire Without Fighting

2026-06-17

A standard CMOS output (push-pull) has two transistors: a PMOS that pulls the pin to VDD for a logic 1, and an NMOS that pulls it to ground for a logic 0. Connect two push-pull outputs together with one driving high and the other driving low, and you've created a short circuit from VDD to GND through both transistors. Smoke follows.

An open-drain output deletes the PMOS. Only the NMOS remains. The driver can pull the line low, or release it (high-impedance). It can never actively drive high. To get a logic 1, an external pull-up resistor tied to VDD lazily charges the line up when nobody is pulling it down.

The magic is what happens when you tie multiple open-drain outputs together: any driver pulling low wins. The line reads high only if every driver releases. That's a wired-AND of all drivers — implemented in zero gates, using only the physics of parallel NMOS transistors and a shared resistor.

Real-world example — I²C bus: SDA and SCL are both open-drain. This is why I²C needs those two pull-up resistors on every bus you've ever wired up. It's also how clock stretching works: a slow slave just holds SCL low, and the master sees the wire stuck at 0 and waits. No arbitration logic, no protocol — just NMOS transistors voting "not yet" by pulling the wire down. Multi-master arbitration uses the same trick: whichever master tries to drive a 1 while another drives a 0 sees the bus at 0, detects the mismatch, and backs off.

Other places you'll see it: open-drain interrupt lines where multiple peripherals share one IRQ pin to the CPU, I/O expander reset lines, and 1-Wire protocols.

The rule of thumb — pull-up sizing: The pull-up R and the bus capacitance C form an RC low-pass filter. Rise time is roughly tr ≈ 0.8 × R × C (10%–90%). For 400 kHz I²C fast-mode with a 100 pF bus, you need tr < 300 ns, so R < 300 ns / (0.8 × 100 pF) ≈ 3.75 kΩ. Too large and edges become sluggish triangles; too small and the NMOS can't sink enough current to pull the line below VIL. The I²C spec caps sink current at 3 mA, which puts a floor on R near 1 kΩ at 3.3V.

The tradeoff is fundamental: open-drain trades fast rising edges (active drive) for the ability to share a wire safely. The pull-up resistor is literally the price you pay in rise time and static power for never having to worry about driver contention.

See it in action: Check out learn Arduino programming in 20 seconds!! (Arduino projects) by Creative A to see this theory applied.
Key Takeaway: Open-drain outputs implement wired-AND for free by only ever pulling down — any driver can veto the bus to 0, and a pull-up resistor lazily provides the 1, which is why I²C needs those two resistors and why slow slaves can stretch the clock without any protocol support.

All newsletters