Let's divide 40508 by 6
We're looking to find how many times 6 goes into 40508.

Let's proceed to step 1:
4 divided by 6 is 0 with a remainder of 4.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtracting 0 from 4 leaves us with 4.
Take the next digit (0) from the dividend and append it to 4, then repeat: 40 / 6

Going ahead to step 2:
6 goes into 40 6 times with a remainder of 4.
The next digit of our result is 6. 
Result so far: 6.0
Deduct 36 from 40 and we're left with 4.
Append the next digit (5) from the dividend to 4 and continue with: 45 / 6

Going ahead to step 3:
The number 6 fits into 45 7 times, leaving a remainder of 3.
The number 7 becomes the next digit in our result. 
Result so far: 67.0
If we take 42 away from 45, we end up with 3.
Bring next digit (0) of the dividend behind the 3 and repeat the process: 30 / 6

Advancing to step 4:
6 goes into 30 5 times with a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 675.0
If we subtract 30 from 30, we get 0.
Include the next digit (8) from the dividend after 0, then repeat: 8 / 6

On to step 5:
6 can be fit into 8 1 times, resulting in a remainder of 2.
Use 1 as the next digit of our solution. 
Result so far: 6751.0
If we subtract 6 from 8, we get 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Going ahead to step 6:
If we divide 20 by 6, we get 3 and a remainder of 2.
The number 3 becomes the next digit in our result. 
Result so far: 6751.3
Deduct 18 from 20 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:
The number 6 fits into 20 3 times, leaving a remainder of 2.
The next digit of our result is 3. 
Result so far: 6751.33
The remainder is 2 after subtracting 18 from 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

After the division, we end up with 6751.33 and a remainder of 0.002.