We look at the division of 807856 by 40 
The aim is to understand the frequency of 40 in 807856.

Advancing to step 1:
If we divide 8 by 40, we get 0 and a remainder of 8.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we take 0 away from 8, we end up with 8.
Take the next digit (0) from the dividend and append it to 8, then repeat: 80 / 40

Let's proceed to step 2:
80 divided by 40 is 2 with a remainder of 0.
Put 2 as the next digit of the answer. 
Result so far: 2.0
Deduct 80 from 80 and we're left with 0.
Fetch the next digit (7) from the dividend, attach it to 0 and continue: 7 / 40

Moving on to step 3:
7 divided by 40 is 0 with a remainder of 7.
The next digit of our result is 0. 
Result so far: 20.0
Deduct 0 from 7 and we're left with 7.
Include the next digit (8) from the dividend after 7, then repeat: 78 / 40

Step 4:
If we divide 78 by 40, we get 1 and a remainder of 38.
Record the quotient 1 as the next digit in the result. 
Result so far: 201.0
Subtracting 40 from 78 leaves us with 38.
Bring next digit (5) of the dividend behind the 38 and repeat the process: 385 / 40

Moving on to step 5:
The number 40 fits into 385 9 times, leaving a remainder of 25.
Put 9 as the next digit of the answer. 
Result so far: 2019.0
If we take 360 away from 385, we end up with 25.
Take the next digit (6) from the dividend and append it to 25, then repeat: 256 / 40

Going ahead to step 6:
If we divide 256 by 40, we get 6 and a remainder of 16.
The next digit of our result is 6. 
Result so far: 20196.0
Subtract 240 from 256 to get 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Moving on to step 7:
The number 40 fits into 160 4 times, leaving a remainder of 0.
Record the quotient 4 as the next digit in the result. 
Result so far: 20196.4
If we subtract 160 from 160, 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.

Going ahead to step 8:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 20196.4
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 9:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 20196.4
Subtracting 0 from 0 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.

Our division results in 20196.4 with a remaining 0.0.