We're dividing 501894 by 40 
We want to figure out the number of times 501894 can be divided by 40.

Going ahead to step 1:
40 can be fit into 5 0 times, resulting in a remainder of 5.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Deduct 0 from 5 and we're left with 5.
Grab the next digit (0) from the dividend, add it to 5, then carry on: 50 / 40

Advancing to step 2:
40 can be fit into 50 1 times, resulting in a remainder of 10.
The next digit of our result is 1. 
Result so far: 1.0
Subtract 40 from 50 to get 10.
Take the next digit (1) from the dividend and append it to 10, then repeat: 101 / 40

Step 3:
101 divided by 40 is 2 with a remainder of 21.
Write down 2 as next digit of the result. 
Result so far: 12.0
Subtracting 80 from 101 leaves us with 21.
Fetch the next digit (8) from the dividend, attach it to 21 and continue: 218 / 40

Moving on to step 4:
218 divided by 40 is 5 with a remainder of 18.
Put 5 as the next digit of the answer. 
Result so far: 125.0
The remainder is 18 after subtracting 200 from 218.
Append the next digit (9) from the dividend to 18 and continue with: 189 / 40

Moving on to step 5:
If we divide 189 by 40, we get 4 and a remainder of 29.
The next digit of our result is 4. 
Result so far: 1254.0
If we subtract 160 from 189, we get 29.
Include the next digit (4) from the dividend after 29, then repeat: 294 / 40

Step 6:
294 divided by 40 is 7 with a remainder of 14.
The number 7 becomes the next digit in our result. 
Result so far: 12547.0
Subtract 280 from 294 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.

Going ahead to step 7:
When dividing 140 by 40, we get 3 with a remainder of 20.
Put 3 as the next digit of the answer. 
Result so far: 12547.3
If we take 120 away from 140, we end up 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.

Let's proceed to step 8:
200 divided by 40 is 5 with a remainder of 0.
Put 5 as the next digit of the answer. 
Result so far: 12547.35
If we subtract 200 from 200, we 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.

Step 9:
0 divided by 40 is 0 with a remainder of 0.
The next digit of our result is 0. 
Result so far: 12547.35
If we subtract 0 from 0, we 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 10:
40 can be fit into 0 0 times, resulting in a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 12547.35
Deduct 0 from 0 and we're left 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.

After the division, we end up with 12547.35 and a remainder of 0.0.