5040 ÷ 2 = 2520 R0
Alright, let's work through the division of 5040 by 2 step by step.

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

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

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

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

The final result is 2520 with a remainder of 0.