I don’t understand how your solution works for an input like 37/3:
Dividend Divisor Quotient Temp
37 3 1 3
37 3 2 6
37 3 4 12
37 3 8 24
37 3 16 48
When the answer should be 12