We're dividing 159862 by 4 
The aim is to understand the frequency of 4 in 159862.

Going ahead to step 1:
If we divide 1 by 4, we get 0 and a remainder of 1.
Put 0 as the next digit of the answer. 
Result so far: 0.0
The remainder is 1 after subtracting 0 from 1.
Bring next digit (5) of the dividend behind the 1 and repeat the process: 15 / 4

Let's proceed to step 2:
The number 4 fits into 15 3 times, leaving a remainder of 3.
The number 3 becomes the next digit in our result. 
Result so far: 3.0
Subtracting 12 from 15 leaves us with 3.
Include the next digit (9) from the dividend after 3, then repeat: 39 / 4

On to step 3:
If we divide 39 by 4, we get 9 and a remainder of 3.
The next digit of our result is 9. 
Result so far: 39.0
If we subtract 36 from 39, we get 3.
Take the next digit (8) from the dividend and append it to 3, then repeat: 38 / 4

Step 4:
When dividing 38 by 4, we get 9 with a remainder of 2.
Put 9 as the next digit of the answer. 
Result so far: 399.0
Subtracting 36 from 38 leaves us with 2.
Include the next digit (6) from the dividend after 2, then repeat: 26 / 4

On to step 5:
4 goes into 26 6 times with a remainder of 2.
The next digit of our result is 6. 
Result so far: 3996.0
Subtract 24 from 26 to get 2.
Grab the next digit (2) from the dividend, add it to 2, then carry on: 22 / 4

On to step 6:
When dividing 22 by 4, we get 5 with a remainder of 2.
Record the quotient 5 as the next digit in the result. 
Result so far: 39965.0
Deduct 20 from 22 and we're left with 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Advancing to step 7:
When dividing 20 by 4, we get 5 with a remainder of 0.
Put 5 as the next digit of the answer. 
Result so far: 39965.5
If we take 20 away from 20, 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:
4 goes into 0 0 times with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 39965.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.

Let's proceed to step 9:
When dividing 0 by 4, we get 0 with a remainder of 0.
The next digit of our result is 0. 
Result so far: 39965.5
The remainder is 0 after subtracting 0 from 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 39965.5, with a leftover of 0.0.