Let's divide 401402 by 4
The aim is to understand the frequency of 4 in 401402.

Going ahead to step 1:
4 goes into 4 1 times with a remainder of 0.
The next digit of our result is 1. 
Result so far: 1.0
Deduct 4 from 4 and we're left with 0.
Append the next digit (0) from the dividend to 0 and continue with: 0 / 4

On to step 2:
4 can be fit into 0 0 times, resulting in a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 10.0
Subtract 0 from 0 to get 0.
Bring next digit (1) of the dividend behind the 0 and repeat the process: 1 / 4

Moving on to step 3:
4 goes into 1 0 times with a remainder of 1.
Put 0 as the next digit of the answer. 
Result so far: 100.0
Subtracting 0 from 1 leaves us with 1.
Grab the next digit (4) from the dividend, add it to 1, then carry on: 14 / 4

On to step 4:
If we divide 14 by 4, we get 3 and a remainder of 2.
Use 3 as the next digit of our solution. 
Result so far: 1003.0
If we subtract 12 from 14, we get 2.
Append the next digit (0) from the dividend to 2 and continue with: 20 / 4

Moving on to step 5:
20 divided by 4 is 5 with a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 10035.0
Deduct 20 from 20 and we're left with 0.
Include the next digit (2) from the dividend after 0, then repeat: 2 / 4

Going ahead to step 6:
2 divided by 4 is 0 with a remainder of 2.
Use 0 as the next digit of our solution. 
Result so far: 100350.0
Deduct 0 from 2 and we're left 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.

Going ahead to step 7:
If we divide 20 by 4, we get 5 and a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 100350.5
Subtract 20 from 20 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.

Advancing to step 8:
When dividing 0 by 4, we get 0 with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 100350.5
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.

Step 9:
0 divided by 4 is 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 100350.5
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.

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