human
Can you provide a code to add two numbers without using arithmetic operators and the other steps required given the following:
Add two numbers without using arithmetic operators | Python3 Program to add two numbers without using arithmetic operator.
Iterate till there is no carry.
carry now contains common set bits of x and y.
Sum of bits of x and y where at least one of the bits is not set.
Carry is shifted by one so that adding it to x gives the required sum.
Driver Code"
Solution in Python:
assistant
#Here is code to add two numbers without using arithmetic operators and the other steps required.
 def Add ( x , y ) :
	while ( y != 0 ) :
		carry = x & y
		x = x ^ y
		y = carry << 1
	return x
print ( Add ( 15 , 32 ) )