Let's divide 540398 by 8
We want to figure out the number of times 540398 can be divided by 8.

On to step 1:
8 goes into 5 0 times with a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtract 0 from 5 to get 5.
Fetch the next digit (4) from the dividend, attach it to 5 and continue: 54 / 8

On to step 2:
54 divided by 8 is 6 with a remainder of 6.
The number 6 becomes the next digit in our result. 
Result so far: 6.0
Subtracting 48 from 54 leaves us with 6.
Append the next digit (0) from the dividend to 6 and continue with: 60 / 8

Step 3:
60 divided by 8 is 7 with a remainder of 4.
Use 7 as the next digit of our solution. 
Result so far: 67.0
Deduct 56 from 60 and we're left with 4.
Bring next digit (3) of the dividend behind the 4 and repeat the process: 43 / 8

On to step 4:
43 divided by 8 is 5 with a remainder of 3.
The number 5 becomes the next digit in our result. 
Result so far: 675.0
Deduct 40 from 43 and we're left with 3.
Bring next digit (9) of the dividend behind the 3 and repeat the process: 39 / 8

Let's proceed to step 5:
If we divide 39 by 8, we get 4 and a remainder of 7.
Write down 4 as next digit of the result. 
Result so far: 6754.0
If we take 32 away from 39, we end up with 7.
Grab the next digit (8) from the dividend, add it to 7, then carry on: 78 / 8

On to step 6:
8 can be fit into 78 9 times, resulting in a remainder of 6.
Put 9 as the next digit of the answer. 
Result so far: 67549.0
Subtracting 72 from 78 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.

Going ahead to step 7:
When dividing 60 by 8, we get 7 with a remainder of 4.
Record the quotient 7 as the next digit in the result. 
Result so far: 67549.7
If we subtract 56 from 60, we 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:
When dividing 40 by 8, we get 5 with a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 67549.75
Deduct 40 from 40 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.

Step 9:
The number 8 fits into 0 0 times, leaving a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 67549.75
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.

Step 10:
The number 8 fits into 0 0 times, leaving a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 67549.75
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 quotient of the division is 67549.75, and the remainder is 0.0.