640794 ÷ 40 
We're looking to find how many times 40 goes into 640794.

Moving on to step 1:
40 can be fit into 6 0 times, resulting in a remainder of 6.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
The remainder is 6 after subtracting 0 from 6.
Append the next digit (4) from the dividend to 6 and continue with: 64 / 40

Let's proceed to step 2:
When dividing 64 by 40, we get 1 with a remainder of 24.
Use 1 as the next digit of our solution. 
Result so far: 1.0
If we subtract 40 from 64, we get 24.
Take the next digit (0) from the dividend and append it to 24, then repeat: 240 / 40

Advancing to step 3:
40 goes into 240 6 times with a remainder of 0.
Write down 6 as next digit of the result. 
Result so far: 16.0
If we take 240 away from 240, we end up with 0.
Include the next digit (7) from the dividend after 0, then repeat: 7 / 40

Moving on to step 4:
The number 40 fits into 7 0 times, leaving a remainder of 7.
The number 0 becomes the next digit in our result. 
Result so far: 160.0
The remainder is 7 after subtracting 0 from 7.
Take the next digit (9) from the dividend and append it to 7, then repeat: 79 / 40

On to step 5:
40 goes into 79 1 times with a remainder of 39.
Put 1 as the next digit of the answer. 
Result so far: 1601.0
If we subtract 40 from 79, we get 39.
Grab the next digit (4) from the dividend, add it to 39, then carry on: 394 / 40

Advancing to step 6:
When dividing 394 by 40, we get 9 with a remainder of 34.
Write down 9 as next digit of the result. 
Result so far: 16019.0
If we take 360 away from 394, we end up with 34.
Since there are no more digits in the dividend, we add a zero to the remainder making it 340, and continue the process.

Let's proceed to step 7:
If we divide 340 by 40, we get 8 and a remainder of 20.
The number 8 becomes the next digit in our result. 
Result so far: 16019.8
Deduct 320 from 340 and we're left with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Advancing to step 8:
If we divide 200 by 40, we get 5 and a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 16019.85
If we take 200 away from 200, 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.

Moving on to step 9:
The number 40 fits into 0 0 times, leaving a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 16019.85
If we subtract 0 from 0, 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.

Step 10:
0 divided by 40 is 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 16019.85
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 quotient of the division is 16019.85, and the remainder is 0.0.