We divide 512147 by 8
The aim is to understand the frequency of 8 in 512147.

Let's proceed to step 1:
When dividing 5 by 8, we get 0 with a remainder of 5.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtracting 0 from 5 leaves us with 5.
Include the next digit (1) from the dividend after 5, then repeat: 51 / 8

Step 2:
8 can be fit into 51 6 times, resulting in a remainder of 3.
The next digit of our result is 6. 
Result so far: 6.0
The remainder is 3 after subtracting 48 from 51.
Append the next digit (2) from the dividend to 3 and continue with: 32 / 8

Going ahead to step 3:
If we divide 32 by 8, we get 4 and a remainder of 0.
Write down 4 as next digit of the result. 
Result so far: 64.0
The remainder is 0 after subtracting 32 from 32.
Fetch the next digit (1) from the dividend, attach it to 0 and continue: 1 / 8

Step 4:
The number 8 fits into 1 0 times, leaving a remainder of 1.
Write down 0 as next digit of the result. 
Result so far: 640.0
Subtracting 0 from 1 leaves us with 1.
Append the next digit (4) from the dividend to 1 and continue with: 14 / 8

Moving on to step 5:
If we divide 14 by 8, we get 1 and a remainder of 6.
The next digit of our result is 1. 
Result so far: 6401.0
The remainder is 6 after subtracting 8 from 14.
Grab the next digit (7) from the dividend, add it to 6, then carry on: 67 / 8

Moving on to step 6:
When dividing 67 by 8, we get 8 with a remainder of 3.
Write down 8 as next digit of the result. 
Result so far: 64018.0
The remainder is 3 after subtracting 64 from 67.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Advancing to step 7:
If we divide 30 by 8, we get 3 and a remainder of 6.
Use 3 as the next digit of our solution. 
Result so far: 64018.3
If we take 24 away from 30, we end up 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.

On to step 8:
60 divided by 8 is 7 with a remainder of 4.
Record the quotient 7 as the next digit in the result. 
Result so far: 64018.37
Deduct 56 from 60 and we're left with 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 9:
40 divided by 8 is 5 with a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 64018.375
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.

Going ahead to 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: 64018.375
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.

On to step 11:
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: 64018.375
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.

The final outcome is 64018.375, with a leftover of 0.0.