We divide 512002 by 40
We want to figure out the number of times 512002 can be divided by 40.

Advancing to step 1:
5 divided by 40 is 0 with a remainder of 5.
The next digit of our result is 0. 
Result so far: 0.0
Subtract 0 from 5 to get 5.
Take the next digit (1) from the dividend and append it to 5, then repeat: 51 / 40

Moving on to step 2:
51 divided by 40 is 1 with a remainder of 11.
The next digit of our result is 1. 
Result so far: 1.0
Subtracting 40 from 51 leaves us with 11.
Include the next digit (2) from the dividend after 11, then repeat: 112 / 40

Moving on to step 3:
40 can be fit into 112 2 times, resulting in a remainder of 32.
Write down 2 as next digit of the result. 
Result so far: 12.0
If we take 80 away from 112, we end up with 32.
Append the next digit (0) from the dividend to 32 and continue with: 320 / 40

Going ahead to step 4:
320 divided by 40 is 8 with a remainder of 0.
Put 8 as the next digit of the answer. 
Result so far: 128.0
Subtracting 320 from 320 leaves us with 0.
Grab the next digit (0) from the dividend, add it to 0, then carry on: 0 / 40

On to step 5:
When dividing 0 by 40, we get 0 with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 1280.0
Subtracting 0 from 0 leaves us with 0.
Grab the next digit (2) from the dividend, add it to 0, then carry on: 2 / 40

On to step 6:
40 goes into 2 0 times with a remainder of 2.
The next digit of our result is 0. 
Result so far: 12800.0
Subtract 0 from 2 to get 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

On to step 7:
40 goes into 20 0 times with a remainder of 20.
Record the quotient 0 as the next digit in the result. 
Result so far: 12800.0
Subtract 0 from 20 to get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Step 8:
40 can be fit into 200 5 times, resulting in a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 12800.05
Subtract 200 from 200 to get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Advancing 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: 12800.05
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.

Advancing to step 10:
0 divided by 40 is 0 with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 12800.05
If we take 0 away from 0, 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.

The final result is 12800.05 with a remainder of 0.0.