40310 ÷ 4 
The aim is to understand the frequency of 4 in 40310.

On to step 1:
When dividing 4 by 4, we get 1 with a remainder of 0.
Write down 1 as next digit of the result. 
Result so far: 1.0
If we subtract 4 from 4, we get 0.
Grab the next digit (0) from the dividend, add it to 0, then carry on: 0 / 4

Moving on to step 2:
4 can be fit into 0 0 times, resulting in a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 10.0
If we take 0 away from 0, we end up with 0.
Append the next digit (3) from the dividend to 0 and continue with: 3 / 4

Moving on to step 3:
3 divided by 4 is 0 with a remainder of 3.
Write down 0 as next digit of the result. 
Result so far: 100.0
Deduct 0 from 3 and we're left with 3.
Grab the next digit (1) from the dividend, add it to 3, then carry on: 31 / 4

Advancing to step 4:
The number 4 fits into 31 7 times, leaving a remainder of 3.
Write down 7 as next digit of the result. 
Result so far: 1007.0
Deduct 28 from 31 and we're left with 3.
Fetch the next digit (0) from the dividend, attach it to 3 and continue: 30 / 4

Going ahead to step 5:
If we divide 30 by 4, we get 7 and a remainder of 2.
Record the quotient 7 as the next digit in the result. 
Result so far: 10077.0
If we take 28 away from 30, we end up with 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Step 6:
If we divide 20 by 4, we get 5 and a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 10077.5
If we take 20 away from 20, 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.

Going ahead to step 7:
4 can be fit into 0 0 times, resulting in a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 10077.5
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.

Step 8:
4 can be fit into 0 0 times, resulting in a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 10077.5
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 outcome is 10077.5, with a leftover of 0.0.