The logic is easy:
If Vin > Vdac, the ADC binary value will increment
If Vdac > Vin, you need to reset by pressing the pushbutton
As you can see, this way is pretty slow, if Vin is a low value the conversion is kinda fast, but if Vin is a high value will take a lot of time to convert comparing to other ADC methods.