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

On to step 1:
6 can be fit into 5 0 times, resulting in a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Include the next digit (0) from the dividend after 5, then repeat: 50 / 6

Moving on to step 2:
If we divide 50 by 6, we get 8 and a remainder of 2.
The number 8 becomes the next digit in our result. 
Result so far: 8.0
If we subtract 48 from 50, we get 2.
Grab the next digit (5) from the dividend, add it to 2, then carry on: 25 / 6

Step 3:
If we divide 25 by 6, we get 4 and a remainder of 1.
Use 4 as the next digit of our solution. 
Result so far: 84.0
The remainder is 1 after subtracting 24 from 25.
Take the next digit (7) from the dividend and append it to 1, then repeat: 17 / 6

Advancing to step 4:
The number 6 fits into 17 2 times, leaving a remainder of 5.
Put 2 as the next digit of the answer. 
Result so far: 842.0
The remainder is 5 after subtracting 12 from 17.
Grab the next digit (8) from the dividend, add it to 5, then carry on: 58 / 6

Advancing to step 5:
6 can be fit into 58 9 times, resulting in a remainder of 4.
The next digit of our result is 9. 
Result so far: 8429.0
The remainder is 4 after subtracting 54 from 58.
Include the next digit (8) from the dividend after 4, then repeat: 48 / 6

Advancing to step 6:
6 can be fit into 48 8 times, resulting in a remainder of 0.
Record the quotient 8 as the next digit in the result. 
Result so far: 84298.0
Deduct 48 from 48 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.

Going ahead to step 7:
6 goes into 0 0 times with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 84298.0
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.

Advancing to step 8:
6 goes into 0 0 times with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 84298.0
Subtract 0 from 0 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.

Our division results in 84298.0 with a remaining 0.0.