human
Check if a Number is Odd or Even using Bitwise Operators | Returns true if n is even , else odd.
n ^ 1 is n + 1 , then even , else odd.
Driver code"
Solution in Python:
 ... Write me a code to check if a Number is Odd or Even using Bitwise Operators and the other steps required?
assistant
#Here is code to check if a Number is Odd or Even using Bitwise Operators and the other steps required.
 def isEven ( n ) :
	if ( n ^ 1 == n + 1 ) :
		return True ;
	else :
		return False ;
if __name__ == " _ _ main _ _ " :
	n = 100 ;
	print ( " Even " ) if isEven ( n ) else print ( " Odd " ) ;