How can 2nd method will take less time

in 2nd method we are just reducing n by 1
like n = 15&14 then 14&13 then 13&12 and so on
whereas in 1st method we are just reducing number of bits so how can 2nd take less time than 1st
I think 2nd will take o(n) time whereas 1st will take o(no of bits time)