Communication Protocols · Interview question

Why does I2C use open-drain lines with pull-up resistors?

A strong answer

Because multiple devices share the same two wires and none must ever fight another. With open-drain outputs, every device can only pull a line low or release it to high-impedance, no device actively drives a high, and a pull-up resistor on each line establishes the idle high level. This gives wired-AND behavior: the line is high only if all devices release it, and any single device pulling low wins, which is exactly what you need on a shared multi-drop bus where two push-pull drivers would short. This same property enables the protocol's handshakes: a slave acknowledges by pulling SDA low (ACK), and a slow slave can pause the master by holding SCL low (clock stretching), both impossible without open-drain. The cost is that pull-ups become a real design parameter: too large and the line can't rise fast enough at the target speed (rounded edges, corrupted data because of bus capacitance), too small and devices can't pull it low or you waste power. The most common consequence in practice is that missing pull-ups leave the bus stuck and nothing works at all.

What a weak answer sounds like

You know the answer. Do you know what gets you dinged?

Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.

From the lesson

I2C

Many devices on two wires: open-drain SDA/SCL with pull-ups, 7-bit addressing, ACK/NACK handshaking, clock stretching, and why a missing pull-up is the classic I2C failure.

More I2C questions

Browse all 472 interview questions
Why does I2C use open-drain lines with pull-up resistors? | EmbeddedPrep.io