Program to clear K | Function to clear the kth bit of n ; Driver code
function clearBit ( n , k ) { return ( n & ( ~ ( 1 << ( k - 1 ) ) ) ) ; } var n = 5 , k = 1 ; document . write ( clearBit ( n , k ) ) ;