Let's divide 239987 by 2
The aim is to understand the frequency of 2 in 239987.

Advancing to step 1:
2 can be fit into 2 1 times, resulting in a remainder of 0.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
If we take 2 away from 2, we end up with 0.
Grab the next digit (3) from the dividend, add it to 0, then carry on: 3 / 2

On to step 2:
2 can be fit into 3 1 times, resulting in a remainder of 1.
Use 1 as the next digit of our solution. 
Result so far: 11.0
If we subtract 2 from 3, we get 1.
Include the next digit (9) from the dividend after 1, then repeat: 19 / 2

Advancing to step 3:
2 can be fit into 19 9 times, resulting in a remainder of 1.
Put 9 as the next digit of the answer. 
Result so far: 119.0
The remainder is 1 after subtracting 18 from 19.
Take the next digit (9) from the dividend and append it to 1, then repeat: 19 / 2

Step 4:
The number 2 fits into 19 9 times, leaving a remainder of 1.
Write down 9 as next digit of the result. 
Result so far: 1199.0
Subtract 18 from 19 to get 1.
Append the next digit (8) from the dividend to 1 and continue with: 18 / 2

Going ahead to step 5:
18 divided by 2 is 9 with a remainder of 0.
Use 9 as the next digit of our solution. 
Result so far: 11999.0
If we take 18 away from 18, we end up with 0.
Append the next digit (7) from the dividend to 0 and continue with: 7 / 2

Moving on to step 6:
The number 2 fits into 7 3 times, leaving a remainder of 1.
Use 3 as the next digit of our solution. 
Result so far: 119993.0
If we subtract 6 from 7, we get 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Step 7:
10 divided by 2 is 5 with a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 119993.5
If we take 10 away from 10, 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.

Advancing to step 8:
0 divided by 2 is 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 119993.5
Deduct 0 from 0 and we're left 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:
The number 2 fits into 0 0 times, leaving a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 119993.5
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.

The final result is 119993.5 with a remainder of 0.0.