Playing with bits doubt

please explain logic /approach to solve this problem

@taran9873 hey tarandeep you have to find the set bits in between the range like sample test
10 15
In between 10 to 15
there are 10 11 12 13 14 15
now take convert each of them in binary
10 00001010
11 00001011
12 00001100
13 00001101
14 00001110
15 00001111
now count set bits i.e no of 1
total no of one is 17 and that the answer and implement with yourself