I am trying to add 2 binary numbers together using python but i can not figure out how to make a very simple program to do it. This is what i got so far but it is not working:
b=input("what number would you like to add ")
convert1= lambda b: str(int(b, 2))
a=input("what number would you like to add to it ")
convert= lambda a: str(int(a, 2))
c=(b+a)
print (c)
convert=lambda c: str(int(c, 2))
print ("Your binary numbers added together is" + convert(c))
What i mean by not working is if say i try adding 1001 and 1001 it will say the answer is 10011001. Which is wrong.
Can someone please explain why this is not working and any other simple ways of doing this.