We're dividing 398021 by 8 
Let's see how many times 8 fits into 398021.

Step 1:
When dividing 3 by 8, we get 0 with a remainder of 3.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 3 after subtracting 0 from 3.
Take the next digit (9) from the dividend and append it to 3, then repeat: 39 / 8

Going ahead to step 2:
The number 8 fits into 39 4 times, leaving a remainder of 7.
Write down 4 as next digit of the result. 
Result so far: 4.0
The remainder is 7 after subtracting 32 from 39.
Take the next digit (8) from the dividend and append it to 7, then repeat: 78 / 8

Step 3:
8 goes into 78 9 times with a remainder of 6.
Use 9 as the next digit of our solution. 
Result so far: 49.0
Deduct 72 from 78 and we're left with 6.
Take the next digit (0) from the dividend and append it to 6, then repeat: 60 / 8

Moving on to step 4:
The number 8 fits into 60 7 times, leaving a remainder of 4.
The number 7 becomes the next digit in our result. 
Result so far: 497.0
If we take 56 away from 60, we end up with 4.
Take the next digit (2) from the dividend and append it to 4, then repeat: 42 / 8

Step 5:
When dividing 42 by 8, we get 5 with a remainder of 2.
Put 5 as the next digit of the answer. 
Result so far: 4975.0
If we take 40 away from 42, we end up with 2.
Append the next digit (1) from the dividend to 2 and continue with: 21 / 8

Moving on to step 6:
When dividing 21 by 8, we get 2 with a remainder of 5.
Put 2 as the next digit of the answer. 
Result so far: 49752.0
Subtract 16 from 21 to get 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Let's proceed to step 7:
When dividing 50 by 8, we get 6 with a remainder of 2.
The next digit of our result is 6. 
Result so far: 49752.6
If we take 48 away from 50, we end up 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.

Step 8:
The number 8 fits into 20 2 times, leaving a remainder of 4.
Write down 2 as next digit of the result. 
Result so far: 49752.62
Deduct 16 from 20 and we're left with 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Step 9:
If we divide 40 by 8, we get 5 and a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 49752.625
If we subtract 40 from 40, 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.

Going ahead to step 10:
When dividing 0 by 8, we get 0 with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 49752.625
Subtracting 0 from 0 leaves us 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.

On to step 11:
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: 49752.625
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 result is 49752.625 with a remainder of 0.0.