We're dividing 312166 by 8 
Our goal is to divide 312166 by 8.

Going ahead to step 1:
8 goes into 3 0 times with a remainder of 3.
The next digit of our result is 0. 
Result so far: 0.0
If we subtract 0 from 3, we get 3.
Grab the next digit (1) from the dividend, add it to 3, then carry on: 31 / 8

On to step 2:
When dividing 31 by 8, we get 3 with a remainder of 7.
Use 3 as the next digit of our solution. 
Result so far: 3.0
If we subtract 24 from 31, we get 7.
Grab the next digit (2) from the dividend, add it to 7, then carry on: 72 / 8

Advancing to step 3:
8 goes into 72 9 times with a remainder of 0.
Put 9 as the next digit of the answer. 
Result so far: 39.0
If we subtract 72 from 72, we get 0.
Bring next digit (1) of the dividend behind the 0 and repeat the process: 1 / 8

Going ahead to step 4:
8 goes into 1 0 times with a remainder of 1.
Use 0 as the next digit of our solution. 
Result so far: 390.0
Subtracting 0 from 1 leaves us with 1.
Include the next digit (6) from the dividend after 1, then repeat: 16 / 8

On to step 5:
When dividing 16 by 8, we get 2 with a remainder of 0.
Record the quotient 2 as the next digit in the result. 
Result so far: 3902.0
If we take 16 away from 16, we end up with 0.
Grab the next digit (6) from the dividend, add it to 0, then carry on: 6 / 8

Let's proceed to step 6:
If we divide 6 by 8, we get 0 and a remainder of 6.
The number 0 becomes the next digit in our result. 
Result so far: 39020.0
Subtracting 0 from 6 leaves us with 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Step 7:
8 can be fit into 60 7 times, resulting in a remainder of 4.
Use 7 as the next digit of our solution. 
Result so far: 39020.7
Subtract 56 from 60 to get 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Advancing to step 8:
8 can be fit into 40 5 times, resulting in a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 39020.75
Subtract 40 from 40 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.

On to step 9:
If we divide 0 by 8, we get 0 and a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 39020.75
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 10:
When dividing 0 by 8, we get 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 39020.75
If we subtract 0 from 0, we 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.

After the division, we end up with 39020.75 and a remainder of 0.0.