Convert numbers into binary representation and add them without carry | Function returns sum of both the binary number without carry ; XOR of N and M ; Driver code
def NoCarrySum ( N , M ) : NEW_LINE INDENT return N ^ M NEW_LINE DEDENT N = 37 NEW_LINE M = 12 NEW_LINE print ( NoCarrySum ( N , M ) ) NEW_LINE