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

Step 1:
The number 8 fits into 3 0 times, leaving a remainder of 3.
The next digit of our result is 0. 
Result so far: 0.0
If we take 0 away from 3, we end up with 3.
Fetch the next digit (1) from the dividend, attach it to 3 and continue: 31 / 8

Let's proceed to step 2:
8 goes into 31 3 times with a remainder of 7.
Write down 3 as next digit of the result. 
Result so far: 3.0
Deduct 24 from 31 and we're left with 7.
Include the next digit (7) from the dividend after 7, then repeat: 77 / 8

Going ahead to step 3:
8 can be fit into 77 9 times, resulting in a remainder of 5.
Record the quotient 9 as the next digit in the result. 
Result so far: 39.0
Deduct 72 from 77 and we're left with 5.
Include the next digit (2) from the dividend after 5, then repeat: 52 / 8

Going ahead to step 4:
The number 8 fits into 52 6 times, leaving a remainder of 4.
The number 6 becomes the next digit in our result. 
Result so far: 396.0
Subtract 48 from 52 to get 4.
Bring next digit (2) of the dividend behind the 4 and repeat the process: 42 / 8

Advancing to step 5:
When dividing 42 by 8, we get 5 with a remainder of 2.
The next digit of our result is 5. 
Result so far: 3965.0
Deduct 40 from 42 and we're left with 2.
Fetch the next digit (3) from the dividend, attach it to 2 and continue: 23 / 8

On to step 6:
8 goes into 23 2 times with a remainder of 7.
Put 2 as the next digit of the answer. 
Result so far: 39652.0
The remainder is 7 after subtracting 16 from 23.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

On to step 7:
8 can be fit into 70 8 times, resulting in a remainder of 6.
Write down 8 as next digit of the result. 
Result so far: 39652.8
Subtracting 64 from 70 leaves us with 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Advancing to step 8:
If we divide 60 by 8, we get 7 and a remainder of 4.
Put 7 as the next digit of the answer. 
Result so far: 39652.87
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.

On to step 9:
8 goes into 40 5 times with a remainder of 0.
Put 5 as the next digit of the answer. 
Result so far: 39652.875
Subtracting 40 from 40 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.

Step 10:
8 goes into 0 0 times with a remainder of 0.
The next digit of our result is 0. 
Result so far: 39652.875
Subtract 0 from 0 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.

Step 11:
8 goes into 0 0 times with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 39652.875
Subtract 0 from 0 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.

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