Doubt in Replace Bits in N by M

In the example code shown, when M=2, shouldn’t binary form be 10, why was it taken 010?

Number of zeros ahead of first set bit wont affect anything … 10 and 010 are both same.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.