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

Moving on to step 1:
3 divided by 40 is 0 with a remainder of 3.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 3, we get 3.
Take the next digit (6) from the dividend and append it to 3, then repeat: 36 / 40

On to step 2:
If we divide 36 by 40, we get 0 and a remainder of 36.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtracting 0 from 36 leaves us with 36.
Grab the next digit (4) from the dividend, add it to 36, then carry on: 364 / 40

Step 3:
If we divide 364 by 40, we get 9 and a remainder of 4.
Use 9 as the next digit of our solution. 
Result so far: 9.0
The remainder is 4 after subtracting 360 from 364.
Append the next digit (3) from the dividend to 4 and continue with: 43 / 40

Going ahead to step 4:
When dividing 43 by 40, we get 1 with a remainder of 3.
The number 1 becomes the next digit in our result. 
Result so far: 91.0
If we take 40 away from 43, we end up with 3.
Grab the next digit (1) from the dividend, add it to 3, then carry on: 31 / 40

Moving on to step 5:
31 divided by 40 is 0 with a remainder of 31.
The next digit of our result is 0. 
Result so far: 910.0
If we subtract 0 from 31, we get 31.
Fetch the next digit (1) from the dividend, attach it to 31 and continue: 311 / 40

Step 6:
40 goes into 311 7 times with a remainder of 31.
Write down 7 as next digit of the result. 
Result so far: 9107.0
Subtract 280 from 311 to get 31.
Since there are no more digits in the dividend, we add a zero to the remainder making it 310, and continue the process.

Let's proceed to step 7:
When dividing 310 by 40, we get 7 with a remainder of 30.
The number 7 becomes the next digit in our result. 
Result so far: 9107.7
The remainder is 30 after subtracting 280 from 310.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Let's proceed to step 8:
If we divide 300 by 40, we get 7 and a remainder of 20.
The next digit of our result is 7. 
Result so far: 9107.77
The remainder is 20 after subtracting 280 from 300.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

The quotient of the division is 9107.77, and the remainder is 0.02.