We're dividing 511544 by 18 
The aim is to understand the frequency of 18 in 511544.

On to step 1:
If we divide 5 by 18, we get 0 and a remainder of 5.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Take the next digit (1) from the dividend and append it to 5, then repeat: 51 / 18

On to step 2:
The number 18 fits into 51 2 times, leaving a remainder of 15.
The number 2 becomes the next digit in our result. 
Result so far: 2.0
Subtract 36 from 51 to get 15.
Take the next digit (1) from the dividend and append it to 15, then repeat: 151 / 18

Advancing to step 3:
18 goes into 151 8 times with a remainder of 7.
Record the quotient 8 as the next digit in the result. 
Result so far: 28.0
Subtracting 144 from 151 leaves us with 7.
Include the next digit (5) from the dividend after 7, then repeat: 75 / 18

Advancing to step 4:
If we divide 75 by 18, we get 4 and a remainder of 3.
Write down 4 as next digit of the result. 
Result so far: 284.0
The remainder is 3 after subtracting 72 from 75.
Append the next digit (4) from the dividend to 3 and continue with: 34 / 18

Going ahead to step 5:
18 goes into 34 1 times with a remainder of 16.
Use 1 as the next digit of our solution. 
Result so far: 2841.0
Deduct 18 from 34 and we're left with 16.
Take the next digit (4) from the dividend and append it to 16, then repeat: 164 / 18

Step 6:
If we divide 164 by 18, we get 9 and a remainder of 2.
The next digit of our result is 9. 
Result so far: 28419.0
The remainder is 2 after subtracting 162 from 164.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Step 7:
When dividing 20 by 18, we get 1 with a remainder of 2.
The number 1 becomes the next digit in our result. 
Result so far: 28419.1
Subtract 18 from 20 to 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.

Going ahead to step 8:
18 goes into 20 1 times with a remainder of 2.
The next digit of our result is 1. 
Result so far: 28419.11
The remainder is 2 after subtracting 18 from 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

The final outcome is 28419.11, with a leftover of 0.002.