We're dividing 512844 by 40 
We want to divide 512844 by 40.

Going ahead to step 1:
40 goes into 5 0 times with a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 5 after subtracting 0 from 5.
Include the next digit (1) from the dividend after 5, then repeat: 51 / 40

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
If we subtract 40 from 51, we get 11.
Append the next digit (2) from the dividend to 11 and continue with: 112 / 40

Step 3:
The number 40 fits into 112 2 times, leaving a remainder of 32.
Use 2 as the next digit of our solution. 
Result so far: 12.0
If we take 80 away from 112, we end up with 32.
Bring next digit (8) of the dividend behind the 32 and repeat the process: 328 / 40

Let's proceed to step 4:
If we divide 328 by 40, we get 8 and a remainder of 8.
Use 8 as the next digit of our solution. 
Result so far: 128.0
The remainder is 8 after subtracting 320 from 328.
Bring next digit (4) of the dividend behind the 8 and repeat the process: 84 / 40

Advancing to step 5:
84 divided by 40 is 2 with a remainder of 4.
Record the quotient 2 as the next digit in the result. 
Result so far: 1282.0
Deduct 80 from 84 and we're left with 4.
Take the next digit (4) from the dividend and append it to 4, then repeat: 44 / 40

Advancing to step 6:
40 can be fit into 44 1 times, resulting in a remainder of 4.
The number 1 becomes the next digit in our result. 
Result so far: 12821.0
Subtracting 40 from 44 leaves us with 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Step 7:
The number 40 fits into 40 1 times, leaving a remainder of 0.
Record the quotient 1 as the next digit in the result. 
Result so far: 12821.1
Subtract 40 from 40 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.

Step 8:
The number 40 fits into 0 0 times, leaving a remainder of 0.
The next digit of our result is 0. 
Result so far: 12821.1
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.

On to step 9:
40 goes into 0 0 times with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 12821.1
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.

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