Let $a\geq b$. We define the division of $a$ by $b$ to be, $$a=bq+r,$$ where $q,r$ are integers and $0\leq r<b$.
How we divide $a$ by $b$ when $a<b$.?
Let $a\geq b$. We define the division of $a$ by $b$ to be, $$a=bq+r,$$ where $q,r$ are integers and $0\leq r<b$.
How we divide $a$ by $b$ when $a<b$.?
That division you give seems to be division for integers. If $b > a$ it turns into $$ a = 0 \cdot b + a $$ Thus having the result $q=a/b = 0$ and rest $r=a \bmod b = a$.