human
Check if n is divisible by power of 2 without using arithmetic operators | function to check whether n is divisible by pow ( 2 , m ).
if expression results to 0 , then n is divisible by pow ( 2 , m ).
n is not divisible.
Driver program to test above"
Solution in Python:
assistant
#Here is code to check if n is divisible by power of 2 without using arithmetic operators and the other steps required.
 def isDivBy2PowerM ( n , m ) :
	if ( n & ( ( 1 << m ) - 1 ) ) == 0 :
		return True
	return False
n = 8
m = 2
if isDivBy2PowerM ( n , m ) :
	print ( " Yes " )
else :
	print ( " No " )