def combine_bytes(bytearr):
    """Given some bytes, join them together to make one long binary

    (e.g. 00001000 00000000   ->    0000100000000000)

    :param bytearr:
    :return:
    """
    bytes_count = len(bytearr)
    result = 0
    for index, byt in enumerate(bytearr):
        offset_bytes = bytes_count - index - 1
        result += byt << 8 * offset_bytes
    return result
