i want to check whether the sum of 2 binary list equals to another binary list
[1, 0, 1] + [0, 1, 1] == [1, 1, 1]
how do i go about doing that in python? tried using numpy but it doesn't work
You can convert decimal to binary using function bin():
bin()
num1 = 2 num2 = 3 res = bin(num1 + num2) print(res)
1.4m articles
1.4m replys
5 comments
57.0k users