We're dividing 56164 by 40 
The aim is to understand the frequency of 40 in 56164.

Advancing to step 1:
The number 40 fits into 5 0 times, leaving 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.
Include the next digit (6) from the dividend after 5, then repeat: 56 / 40

Going ahead to step 2:
The number 40 fits into 56 1 times, leaving a remainder of 16.
Use 1 as the next digit of our solution. 
Result so far: 1.0
The remainder is 16 after subtracting 40 from 56.
Bring next digit (1) of the dividend behind the 16 and repeat the process: 161 / 40

Advancing to step 3:
If we divide 161 by 40, we get 4 and a remainder of 1.
Write down 4 as next digit of the result. 
Result so far: 14.0
Deduct 160 from 161 and we're left with 1.
Append the next digit (6) from the dividend to 1 and continue with: 16 / 40

Advancing to step 4:
The number 40 fits into 16 0 times, leaving a remainder of 16.
Put 0 as the next digit of the answer. 
Result so far: 140.0
If we subtract 0 from 16, we get 16.
Bring next digit (4) of the dividend behind the 16 and repeat the process: 164 / 40

Moving on to step 5:
164 divided by 40 is 4 with a remainder of 4.
Write down 4 as next digit of the result. 
Result so far: 1404.0
Subtract 160 from 164 to get 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Moving on to step 6:
The number 40 fits into 40 1 times, leaving a remainder of 0.
The next digit of our result is 1. 
Result so far: 1404.1
The remainder is 0 after subtracting 40 from 40.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Step 7:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 1404.1
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.

On to step 8:
If we divide 0 by 40, we get 0 and a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 1404.1
If we subtract 0 from 0, 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.

The final result is 1404.1 with a remainder of 0.0.