adding binary numbers without converting to decimal or using built in functions
<p>I'm adding two binary numbers inputted as strings and outputting their sum as a string in binary using this <a href="http://www.wikihow.com/Add-Binary-Numbers" rel="nofollow">method</a>.</p>

<p>Any thoughts on getting my code to work?</p>

<pre><code>def add(a,b):
    a = list(a)
    b = list(b)
    equalize(a,b)
    sum_check(a,b,ctr)
    out = " ".join(str(x) for x in sum_check(a,b,ctr))
    out.replace(" ","")
    print(out)

def equalize(a,b):
    if len(a) &gt; len(b):
        for i in range(0, len(a)-len(b)):
            b.insert(0,'0')
    elif len(a) &lt; len(b):
        for i in range(0, len(b)-len(a)):
            a.insert(0,'0')

def sum_check(a,b):

    out = []
    ctr = 0

    def sum(a, b):

        if ctr &gt; 0:
            if a[-1] + b[-1] == 2:
                out.append('1')
            elif a[-1] + b[-1] == 0:
                out.append('1')
                ctr -= 1
            else:  # a[-1] + b[-1] = 1
                out.append('0')
                ctr -= 1
        else:  # ctr = 0
            if a[-1] + b[-1] == 2:
                out.append('1')
                ctr += 1
            elif a[-1] + b[-1] == 0:
                out.append('0')
            else:  # a[-1] + b[-1] = 1
                out.append('1')

    for i in range(len(a)):
        if i == 0:
            sum(a,b)
        else:
            new_a = a[:-1]
            new_b = b[:-1]
            sum(new_a, new_b)

    return out
</code></pre>