Set the K | function to set the kth bit ; kth bit of n is being set by this operation ; Driver Code
< ? php function setKthBit ( $ n , $ k ) { return ( ( 1 << $ k ) $ n ) ; } $ n = 10 ; $ k = 2 ; echo " Kth ▁ bit ▁ set ▁ number ▁ = ▁ " , setKthBit ( $ n , $ k ) ; ? >