We divide 505984 by 40
Our goal is to divide 505984 by 40.

Advancing to step 1:
5 divided by 40 is 0 with a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtracting 0 from 5 leaves us with 5.
Bring next digit (0) of the dividend behind the 5 and repeat the process: 50 / 40

Advancing to step 2:
If we divide 50 by 40, we get 1 and a remainder of 10.
Use 1 as the next digit of our solution. 
Result so far: 1.0
If we subtract 40 from 50, we get 10.
Grab the next digit (5) from the dividend, add it to 10, then carry on: 105 / 40

Step 3:
105 divided by 40 is 2 with a remainder of 25.
Write down 2 as next digit of the result. 
Result so far: 12.0
Deduct 80 from 105 and we're left with 25.
Fetch the next digit (9) from the dividend, attach it to 25 and continue: 259 / 40

Moving on to step 4:
40 goes into 259 6 times with a remainder of 19.
Write down 6 as next digit of the result. 
Result so far: 126.0
Subtracting 240 from 259 leaves us with 19.
Bring next digit (8) of the dividend behind the 19 and repeat the process: 198 / 40

Moving on to step 5:
The number 40 fits into 198 4 times, leaving a remainder of 38.
Write down 4 as next digit of the result. 
Result so far: 1264.0
If we subtract 160 from 198, we get 38.
Fetch the next digit (4) from the dividend, attach it to 38 and continue: 384 / 40

On to step 6:
384 divided by 40 is 9 with a remainder of 24.
Write down 9 as next digit of the result. 
Result so far: 12649.0
If we take 360 away from 384, we end up 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.

On to step 7:
40 goes into 240 6 times with a remainder of 0.
The next digit of our result is 6. 
Result so far: 12649.6
If we take 240 away from 240, 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.

On to step 8:
40 can be fit into 0 0 times, resulting in a remainder of 0.
The next digit of our result is 0. 
Result so far: 12649.6
Subtract 0 from 0 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.

Let's proceed to step 9:
0 divided by 40 is 0 with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 12649.6
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.

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