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

On to step 1:
2 goes into 7 3 times with a remainder of 1.
Use 3 as the next digit of our solution. 
Result so far: 3.0
Subtracting 6 from 7 leaves us with 1.
Fetch the next digit (9) from the dividend, attach it to 1 and continue: 19 / 2

On to step 2:
The number 2 fits into 19 9 times, leaving a remainder of 1.
The number 9 becomes the next digit in our result. 
Result so far: 39.0
The remainder is 1 after subtracting 18 from 19.
Fetch the next digit (7) from the dividend, attach it to 1 and continue: 17 / 2

Moving on to step 3:
The number 2 fits into 17 8 times, leaving a remainder of 1.
Put 8 as the next digit of the answer. 
Result so far: 398.0
If we take 16 away from 17, we end up with 1.
Include the next digit (6) from the dividend after 1, then repeat: 16 / 2

Step 4:
2 goes into 16 8 times with a remainder of 0.
Put 8 as the next digit of the answer. 
Result so far: 3988.0
Subtract 16 from 16 to get 0.
Grab the next digit (4) from the dividend, add it to 0, then carry on: 4 / 2

Advancing to step 5:
When dividing 4 by 2, we get 2 with a remainder of 0.
Record the quotient 2 as the next digit in the result. 
Result so far: 39882.0
The remainder is 0 after subtracting 4 from 4.
Append the next digit (5) from the dividend to 0 and continue with: 5 / 2

Moving on to step 6:
When dividing 5 by 2, we get 2 with a remainder of 1.
Record the quotient 2 as the next digit in the result. 
Result so far: 398822.0
If we take 4 away from 5, we end up with 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Advancing to step 7:
2 can be fit into 10 5 times, resulting in a remainder of 0.
The next digit of our result is 5. 
Result so far: 398822.5
Subtract 10 from 10 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 8:
The number 2 fits into 0 0 times, leaving a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 398822.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.

Moving on to step 9:
2 goes into 0 0 times with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 398822.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.

Our division results in 398822.5 with a remaining 0.0.