class Bits: def __init__(self, value, encoding='ascii', length=None): if isinstance(value, str): self.int = ord(value) elif isinstance(value, int): self.int = value % 128 # ⚠️ change to 128 (ASCII range) else: raise TypeError("Unsupported type") @property def ascii(self): return chr(self.int) def __add__(self, other): return Bits((self.int + other.int) % 128) def __sub__(self, other): return Bits((self.int - other.int) % 128) def __repr__(self): return f"Bits({self.int})"