Let's divide 870534 by 40
Let's see how many times 40 fits into 870534.

Advancing to step 1:
40 goes into 8 0 times with a remainder of 8.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtracting 0 from 8 leaves us with 8.
Grab the next digit (7) from the dividend, add it to 8, then carry on: 87 / 40

Step 2:
87 divided by 40 is 2 with a remainder of 7.
Use 2 as the next digit of our solution. 
Result so far: 2.0
The remainder is 7 after subtracting 80 from 87.
Take the next digit (0) from the dividend and append it to 7, then repeat: 70 / 40

Moving on to step 3:
If we divide 70 by 40, we get 1 and a remainder of 30.
The next digit of our result is 1. 
Result so far: 21.0
If we subtract 40 from 70, we get 30.
Fetch the next digit (5) from the dividend, attach it to 30 and continue: 305 / 40

Moving on to step 4:
305 divided by 40 is 7 with a remainder of 25.
The number 7 becomes the next digit in our result. 
Result so far: 217.0
Subtract 280 from 305 to get 25.
Take the next digit (3) from the dividend and append it to 25, then repeat: 253 / 40

On to step 5:
40 goes into 253 6 times with a remainder of 13.
The number 6 becomes the next digit in our result. 
Result so far: 2176.0
If we take 240 away from 253, we end up with 13.
Fetch the next digit (4) from the dividend, attach it to 13 and continue: 134 / 40

Moving on to step 6:
If we divide 134 by 40, we get 3 and a remainder of 14.
The next digit of our result is 3. 
Result so far: 21763.0
Subtract 120 from 134 to get 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

On to step 7:
The number 40 fits into 140 3 times, leaving a remainder of 20.
The next digit of our result is 3. 
Result so far: 21763.3
Subtracting 120 from 140 leaves us with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Moving on to step 8:
If we divide 200 by 40, we get 5 and a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 21763.35
If we take 200 away from 200, we end up with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Going ahead to step 9:
40 goes into 0 0 times with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 21763.35
The remainder is 0 after subtracting 0 from 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Moving on to step 10:
0 divided by 40 is 0 with a remainder of 0.
The next digit of our result is 0. 
Result so far: 21763.35
The remainder is 0 after subtracting 0 from 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

The quotient of the division is 21763.35, and the remainder is 0.0.