Trying to understand pull-up resistors

The way the OneWire bus works is that the data line is a wired-AND gate. Only if every device lets the line go HIGH, will it be HIGH.

Any device that pulls the line LOW will mean its LOW everywhere. Only if no devices pull it low will it go HIGH, and that is due to the pull-up resistor.

For this to work devices never actively pull the line HIGH, only the resistor does that, and it can only do it if nothing actively pulls it low because its weaker than active pull-downs (which will be something around 30 to 300 ohms or so).

The OneWire protocol is quite complicated and clever to use this wired-AND to be able to communicate with many devices and identify them all uniquely, all from one signal wire.