Let's divide 987478 by 8
The aim is to understand the frequency of 8 in 987478.

Going ahead to step 1:
When dividing 9 by 8, we get 1 with a remainder of 1.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
If we take 8 away from 9, we end up with 1.
Append the next digit (8) from the dividend to 1 and continue with: 18 / 8

Advancing to step 2:
If we divide 18 by 8, we get 2 and a remainder of 2.
The next digit of our result is 2. 
Result so far: 12.0
If we take 16 away from 18, we end up with 2.
Grab the next digit (7) from the dividend, add it to 2, then carry on: 27 / 8

Let's proceed to step 3:
If we divide 27 by 8, we get 3 and a remainder of 3.
The number 3 becomes the next digit in our result. 
Result so far: 123.0
Deduct 24 from 27 and we're left with 3.
Append the next digit (4) from the dividend to 3 and continue with: 34 / 8

Step 4:
34 divided by 8 is 4 with a remainder of 2.
Record the quotient 4 as the next digit in the result. 
Result so far: 1234.0
Subtract 32 from 34 to get 2.
Bring next digit (7) of the dividend behind the 2 and repeat the process: 27 / 8

Advancing to step 5:
8 can be fit into 27 3 times, resulting in a remainder of 3.
The next digit of our result is 3. 
Result so far: 12343.0
Subtracting 24 from 27 leaves us with 3.
Append the next digit (8) from the dividend to 3 and continue with: 38 / 8

Step 6:
8 can be fit into 38 4 times, resulting in a remainder of 6.
Put 4 as the next digit of the answer. 
Result so far: 123434.0
The remainder is 6 after subtracting 32 from 38.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Step 7:
The number 8 fits into 60 7 times, leaving a remainder of 4.
The number 7 becomes the next digit in our result. 
Result so far: 123434.7
If we subtract 56 from 60, we 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.

Step 8:
40 divided by 8 is 5 with a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 123434.75
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.

Going ahead to step 9:
8 goes into 0 0 times with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 123434.75
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 10:
When dividing 0 by 8, we get 0 with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 123434.75
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.

The quotient of the division is 123434.75, and the remainder is 0.0.