We look at the division of 50870 by 31 
Let's see how many times 31 fits into 50870.

On to step 1:
When dividing 5 by 31, we get 0 with a remainder of 5.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we take 0 away from 5, we end up with 5.
Bring next digit (0) of the dividend behind the 5 and repeat the process: 50 / 31

Advancing to step 2:
31 goes into 50 1 times with a remainder of 19.
Write down 1 as next digit of the result. 
Result so far: 1.0
Subtract 31 from 50 to get 19.
Take the next digit (8) from the dividend and append it to 19, then repeat: 198 / 31

Step 3:
If we divide 198 by 31, we get 6 and a remainder of 12.
Use 6 as the next digit of our solution. 
Result so far: 16.0
If we take 186 away from 198, we end up with 12.
Include the next digit (7) from the dividend after 12, then repeat: 127 / 31

Moving on to step 4:
The number 31 fits into 127 4 times, leaving a remainder of 3.
Write down 4 as next digit of the result. 
Result so far: 164.0
Subtracting 124 from 127 leaves us with 3.
Append the next digit (0) from the dividend to 3 and continue with: 30 / 31

Advancing to step 5:
31 can be fit into 30 0 times, resulting in a remainder of 30.
Use 0 as the next digit of our solution. 
Result so far: 1640.0
If we subtract 0 from 30, we get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Going ahead to step 6:
31 goes into 300 9 times with a remainder of 21.
Write down 9 as next digit of the result. 
Result so far: 1640.9
If we take 279 away from 300, we end up with 21.
Since there are no more digits in the dividend, we add a zero to the remainder making it 210, and continue the process.

Going ahead to step 7:
If we divide 210 by 31, we get 6 and a remainder of 24.
The number 6 becomes the next digit in our result. 
Result so far: 1640.96
Deduct 186 from 210 and we're left with 24.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Step 8:
If we divide 240 by 31, we get 7 and a remainder of 23.
Record the quotient 7 as the next digit in the result. 
Result so far: 1640.967
Deduct 217 from 240 and we're left with 23.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

Step 9:
The number 31 fits into 230 7 times, leaving a remainder of 13.
Record the quotient 7 as the next digit in the result. 
Result so far: 1640.9677
Subtracting 217 from 230 leaves us with 13.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

The quotient of the division is 1640.9677, and the remainder is 0.00013.