We look at the division of 501797 by 16 
Let's see how many times 16 fits into 501797.

Going ahead to step 1:
When dividing 5 by 16, we get 0 with a remainder of 5.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Deduct 0 from 5 and we're left with 5.
Fetch the next digit (0) from the dividend, attach it to 5 and continue: 50 / 16

Step 2:
When dividing 50 by 16, we get 3 with a remainder of 2.
Use 3 as the next digit of our solution. 
Result so far: 3.0
Subtract 48 from 50 to get 2.
Append the next digit (1) from the dividend to 2 and continue with: 21 / 16

Step 3:
21 divided by 16 is 1 with a remainder of 5.
The number 1 becomes the next digit in our result. 
Result so far: 31.0
Deduct 16 from 21 and we're left with 5.
Bring next digit (7) of the dividend behind the 5 and repeat the process: 57 / 16

Step 4:
The number 16 fits into 57 3 times, leaving a remainder of 9.
Write down 3 as next digit of the result. 
Result so far: 313.0
Subtract 48 from 57 to get 9.
Fetch the next digit (9) from the dividend, attach it to 9 and continue: 99 / 16

On to step 5:
16 goes into 99 6 times with a remainder of 3.
Write down 6 as next digit of the result. 
Result so far: 3136.0
If we take 96 away from 99, we end up with 3.
Grab the next digit (7) from the dividend, add it to 3, then carry on: 37 / 16

Step 6:
37 divided by 16 is 2 with a remainder of 5.
Record the quotient 2 as the next digit in the result. 
Result so far: 31362.0
Subtracting 32 from 37 leaves us with 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Advancing to step 7:
50 divided by 16 is 3 with a remainder of 2.
Write down 3 as next digit of the result. 
Result so far: 31362.3
Subtracting 48 from 50 leaves us 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.

Let's proceed to step 8:
The number 16 fits into 20 1 times, leaving a remainder of 4.
Use 1 as the next digit of our solution. 
Result so far: 31362.31
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.

Going ahead to step 9:
16 can be fit into 40 2 times, resulting in a remainder of 8.
Use 2 as the next digit of our solution. 
Result so far: 31362.312
Subtracting 32 from 40 leaves us with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Advancing to step 10:
16 goes into 80 5 times with a remainder of 0.
The next digit of our result is 5. 
Result so far: 31362.3125
If we take 80 away from 80, 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.

On to step 11:
When dividing 0 by 16, we get 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 31362.3125
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.

Advancing to step 12:
16 goes into 0 0 times with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 31362.3125
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.

The final outcome is 31362.3125, with a leftover of 0.0.