def ones_complement_addition(x, y, bitsize=16):
    """
    Add two numbers of any bitsize and carry the carry around.

    11 + 10 = 101 => 10:
    >>> ones_complement_addition(3, 2, 2)
    2

    11 + 11 = 110 => 11:
    >>> ones_complement_addition(3, 3, 2)
    3

    00 + 10 = 10 => 10:
    >>> ones_complement_addition(0, 2, 2)
    2
    """
    cap = 2 ** bitsize - 1
    total = x + y
    if total > cap:
        total -= cap
    return total