We look at the division of 501131 by 40 
We're looking to find how many times 40 goes into 501131.

Advancing to step 1:
40 goes into 5 0 times with 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.
Take the next digit (0) from the dividend and append it to 5, then repeat: 50 / 40

Moving on to step 2:
The number 40 fits into 50 1 times, leaving a remainder of 10.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
If we subtract 40 from 50, we get 10.
Fetch the next digit (1) from the dividend, attach it to 10 and continue: 101 / 40

Advancing to step 3:
40 goes into 101 2 times with a remainder of 21.
Put 2 as the next digit of the answer. 
Result so far: 12.0
The remainder is 21 after subtracting 80 from 101.
Grab the next digit (1) from the dividend, add it to 21, then carry on: 211 / 40

Let's proceed to step 4:
211 divided by 40 is 5 with a remainder of 11.
Write down 5 as next digit of the result. 
Result so far: 125.0
If we take 200 away from 211, we end up with 11.
Fetch the next digit (3) from the dividend, attach it to 11 and continue: 113 / 40

On to step 5:
If we divide 113 by 40, we get 2 and a remainder of 33.
The number 2 becomes the next digit in our result. 
Result so far: 1252.0
Subtracting 80 from 113 leaves us with 33.
Fetch the next digit (1) from the dividend, attach it to 33 and continue: 331 / 40

Going ahead to step 6:
40 can be fit into 331 8 times, resulting in a remainder of 11.
Write down 8 as next digit of the result. 
Result so far: 12528.0
If we take 320 away from 331, we end up with 11.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Step 7:
If we divide 110 by 40, we get 2 and a remainder of 30.
The next digit of our result is 2. 
Result so far: 12528.2
The remainder is 30 after subtracting 80 from 110.
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 8:
40 goes into 300 7 times with a remainder of 20.
Write down 7 as next digit of the result. 
Result so far: 12528.27
Subtracting 280 from 300 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.

Let's proceed to step 9:
200 divided by 40 is 5 with a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 12528.275
Subtracting 200 from 200 leaves us 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.

Let's proceed to step 10:
When dividing 0 by 40, we get 0 with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 12528.275
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.

Moving on to step 11:
If we divide 0 by 40, we get 0 and a remainder of 0.
The next digit of our result is 0. 
Result so far: 12528.275
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 outcome is 12528.275, with a leftover of 0.0.