- Host codes are signed Python ints (
kin[-M, M]), not sign-magnitude bit patterns. Arithmetic is simpler and overflow-free on signed codes, and the two forms are the same information.x.bits,sf.from_bitsandSFFormat.to_bits/from_bitsconvert at the device boundary. A -0 bit pattern coming back from the device becomes +0 (_format.py).
Design decisions
Representation
Decision log: representation