We look at the division of 287166 by 2 
The aim is to understand the frequency of 2 in 287166.

Step 1:
2 divided by 2 is 1 with a remainder of 0.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
Subtract 2 from 2 to get 0.
Grab the next digit (8) from the dividend, add it to 0, then carry on: 8 / 2

Going ahead to step 2:
When dividing 8 by 2, we get 4 with a remainder of 0.
The number 4 becomes the next digit in our result. 
Result so far: 14.0
If we take 8 away from 8, we end up with 0.
Fetch the next digit (7) from the dividend, attach it to 0 and continue: 7 / 2

On to step 3:
When dividing 7 by 2, we get 3 with a remainder of 1.
The number 3 becomes the next digit in our result. 
Result so far: 143.0
Deduct 6 from 7 and we're left with 1.
Take the next digit (1) from the dividend and append it to 1, then repeat: 11 / 2

Advancing to step 4:
The number 2 fits into 11 5 times, leaving a remainder of 1.
The number 5 becomes the next digit in our result. 
Result so far: 1435.0
If we take 10 away from 11, we end up with 1.
Take the next digit (6) from the dividend and append it to 1, then repeat: 16 / 2

Moving on to step 5:
The number 2 fits into 16 8 times, leaving a remainder of 0.
Put 8 as the next digit of the answer. 
Result so far: 14358.0
The remainder is 0 after subtracting 16 from 16.
Include the next digit (6) from the dividend after 0, then repeat: 6 / 2

Let's proceed to step 6:
6 divided by 2 is 3 with a remainder of 0.
Use 3 as the next digit of our solution. 
Result so far: 143583.0
Subtract 6 from 6 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.

Let's proceed to step 7:
2 can be fit into 0 0 times, resulting in a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 143583.0
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.

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: 143583.0
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 outcome is 143583.0, with a leftover of 0.0.