We look at the division of 9942865 by 8 
The aim is to understand the frequency of 8 in 9942865.

On to step 1:
9 divided by 8 is 1 with a remainder of 1.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
Subtracting 8 from 9 leaves us with 1.
Take the next digit (9) from the dividend and append it to 1, then repeat: 19 / 8

Let's proceed to step 2:
If we divide 19 by 8, we get 2 and a remainder of 3.
The number 2 becomes the next digit in our result. 
Result so far: 12.0
If we subtract 16 from 19, we get 3.
Include the next digit (4) from the dividend after 3, then repeat: 34 / 8

Let's proceed to step 3:
If we divide 34 by 8, we get 4 and a remainder of 2.
The number 4 becomes the next digit in our result. 
Result so far: 124.0
If we subtract 32 from 34, we get 2.
Include the next digit (2) from the dividend after 2, then repeat: 22 / 8

Advancing to step 4:
When dividing 22 by 8, we get 2 with a remainder of 6.
Use 2 as the next digit of our solution. 
Result so far: 1242.0
If we take 16 away from 22, we end up with 6.
Append the next digit (8) from the dividend to 6 and continue with: 68 / 8

Moving on to step 5:
68 divided by 8 is 8 with a remainder of 4.
The number 8 becomes the next digit in our result. 
Result so far: 12428.0
Subtract 64 from 68 to get 4.
Bring next digit (6) of the dividend behind the 4 and repeat the process: 46 / 8

Moving on to step 6:
8 can be fit into 46 5 times, resulting in a remainder of 6.
Record the quotient 5 as the next digit in the result. 
Result so far: 124285.0
Deduct 40 from 46 and we're left with 6.
Grab the next digit (5) from the dividend, add it to 6, then carry on: 65 / 8

Step 7:
If we divide 65 by 8, we get 8 and a remainder of 1.
The next digit of our result is 8. 
Result so far: 1242858.0
Deduct 64 from 65 and we're left with 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Going ahead to step 8:
When dividing 10 by 8, we get 1 with a remainder of 2.
Record the quotient 1 as the next digit in the result. 
Result so far: 1242858.1
If we subtract 8 from 10, we get 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 9:
20 divided by 8 is 2 with a remainder of 4.
Write down 2 as next digit of the result. 
Result so far: 1242858.12
Subtract 16 from 20 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 10:
40 divided by 8 is 5 with a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 1242858.125
If we take 40 away from 40, 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.

Moving on to step 11:
If we divide 0 by 8, we get 0 and a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 1242858.125
If we take 0 away from 0, 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.

Step 12:
The number 8 fits into 0 0 times, leaving a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 1242858.125
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.

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