40 divided by 9 
We want to figure out the number of times 40 can be divided by 9.

Advancing to step 1:
If we divide 4 by 9, we get 0 and a remainder of 4.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Deduct 0 from 4 and we're left with 4.
Fetch the next digit (0) from the dividend, attach it to 4 and continue: 40 / 9

Step 2:
The number 9 fits into 40 4 times, leaving a remainder of 4.
The number 4 becomes the next digit in our result. 
Result so far: 4.0
Subtract 36 from 40 to 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 3:
9 can be fit into 40 4 times, resulting in a remainder of 4.
The number 4 becomes the next digit in our result. 
Result so far: 4.4
If we take 36 away from 40, we end up 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.

Moving on to step 4:
9 can be fit into 40 4 times, resulting in a remainder of 4.
The next digit of our result is 4. 
Result so far: 4.44
If we subtract 36 from 40, 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.

Our division results in 4.44 with a remaining 0.004.