Documentation

Complexity.Computability.Machines.Turing.MultiTape.Encodings.IntBinary.Decode

Total decoding of binary signed integers #

Read a sign bit and a binary magnitude. Missing data is zero, surplus high zero bits are ignored, and negative zero is normalized to zero. This reuses the existing natural-number decoder and sign/magnitude arithmetic. The roundtrip applies to every canonical encIntBin word; total decoding alone is not a canonical-input validator.

Main definitions #

Main results #

Decode any sign/magnitude word; malformed and negative-zero words still decode totally.

Instances For

    Every canonical signed binary word decodes to its original integer.

    Binary sign/magnitude decoding is uniformly plain polynomial time on arbitrary words.