(self, other)
| 54 | return repr(self.array) |
| 55 | |
| 56 | def __add__(self, other): |
| 57 | if not isinstance(other, BitArray): |
| 58 | return NotImplemented |
| 59 | return BitArray(self.size + other.size, self.array + other.array) |
| 60 | |
| 61 | def to_int(self): |
| 62 | return int("".join([str(i) for i in self.array]), 2) |