Understanding the ADS1015 breakout

Hi there, I have a ADS1015 +/-24V ADC breakout and I’m having trouble understanding how it works. I’m using it in single-ended mode.

In particular, I’m looking at this Python code, to get the compensated voltage:
get_compensated_voltage()

As you can see, it’s multiplying the raw voltage by (float(8060000+402000))/float(402000.0) which is equal to 21.05, then adding the reference voltage.

I realize there’s a voltage divider at the input of the buffers, but I don’t understand this multiplier. e.g., if the input were floating, the voltage would be VREF, or 1.24V. Why is that being multiplied by 21.05 then added to the reference voltage? Also, why is VREF on the other side of the voltage divider instead of GND?

I’m surely missing something - thanks in advance for the assistance!