Find value of k | JavaScript program to find k - th bit from right ; Driver Code ; Function Call
function printKthBit ( n , k ) { document . write ( ( n & ( 1 << ( k - 1 ) ) ) >> ( k - 1 ) ) ; } var n = 13 , k = 2 ; printKthBit ( n , k ) ;