8 . Remove the ith set bit .

 

       Ex :  n =   19 ( 1 0 0 1 1)

               i   =  1

 

         (1<<i)  = 0 0 0 1 0

       ~(1<<i)  = 1 1 1 0 1  (1’s compliment)

         Now ,

         19          =      1 0 0 1 1

        ~(1<<i)   = &  1 1 1 0 1 

                       =      1 0 0 0 1 (= 17)


                   









Comments