$\newcommand{\qr}[1]{|#1\rangle}$Say I begin with $10$ q-bits $\qr{+}\qr{+}\qr{+}\qr{+}\qr{+}\qr{+}\qr{+}\qr{+}\qr{+}\qr{+}$ forming a register $B$. Name these q-bits as $b_9, ..., b_2, b_1, b_0$.
Apply a gate $U_{\operatorname{div}}$ to $B$. For clarity, assume $U_\text{div}$ divides the number represented by q-bits $b_7 b_6 b_5 b_4 b_3 b_2 b_1 b_0$ by the number represented by $b_9 b_8$. The output of $U_\text{div}$ is written as follows. It leaves $b_9 b_8$ alone, writes the quotient of the division in $b_7 b_6 b_5 b_4 b_3 b_2$ and the rest is written in $b_1 b_0$. (This makes sense: if only $2$ q-bits are allowed for the divisor, the greatest divisor possible is $3$, so the greatest rest possible is $2$, so $2$ q-bits for the rest is enough.)
Say now I measure $b_1 b_0$ getting the classical bits $01$, meaning the rest of the division is $1$. Also I measure $b_7 b_6 b_5 b_4 b_3 b_2$ getting the classical bits $001110$, meaning my quotient is $14$. Finally, say I measure $b_9 b_8$ getting the classical bits $10$.
This means I effectively had $a = 14\times 2 + 1 = 29$, where $a$ represents the dividend. But it seems to me impossible to talk about what $a$ had to be since $a$ would be written in q-bits $b_7 b_6 b_5 b_4 b_3 b_2 b_1 b_0$ which was $\qr{+}\qr{+}\qr{+}\qr{+}\qr{+}\qr{+}\qr{+}\qr{+}$ at the start. It seems to me I could never infer the dividend in this experiment, though the only arithmetic that seems to make sense is $a = 14\times 2 + 1 = 29$.
What's going on here?