Should addition of binary numbers in array be done from left-to-right or right-to-left?

Advertisements So i was solving exercise 2.1-5 from CLRS book where in we need to add two n-bit binary integers a and b, stored in n-element array. I found the following solution: def AddBinary(A,B): n = max(len(A), len(B)) C = [0 for i in range(n+1)] carry = 0 for i in range(n): C[i] = (A[i]… Read More Should addition of binary numbers in array be done from left-to-right or right-to-left?