31172 ÷ 2 = 15586 R0
Let's divide 31172 by 2.

Step 1:
2 goes into 3 1 times with a remainder of 1.
Write down 1 as next digit of of the result. 
Result so far: 1
Subtract 2 from 3 to get 1.
Bring next digit (1) of the dividend behind the 1 and repeat the process: 11 / 2

Step 2:
2 goes into 11 5 times with a remainder of 1.
Write down 5 as next digit of of the result. 
Result so far: 15
Subtract 10 from 11 to get 1.
Bring next digit (1) of the dividend behind the 1 and repeat the process: 11 / 2

Step 3:
2 goes into 11 5 times with a remainder of 1.
Write down 5 as next digit of of the result. 
Result so far: 155
Subtract 10 from 11 to get 1.
Bring next digit (7) of the dividend behind the 1 and repeat the process: 17 / 2

Step 4:
2 goes into 17 8 times with a remainder of 1.
Write down 8 as next digit of of the result. 
Result so far: 1558
Subtract 16 from 17 to get 1.
Bring next digit (2) of the dividend behind the 1 and repeat the process: 12 / 2

Step 5:
2 goes into 12 6 times with a remainder of 0.
Write down 6 as next digit of of the result. 
Result so far: 15586
Subtract 12 from 12 to get 0.

The final result is 15586 with a remainder of 0.