Zum Inhalt springenSkip to content
Number Encodings

Excess-q

Encodes integers with a fixed bias q. Lexicographically sortable bit patterns.

Configure your inputs and press Compute to see the step-by-step computation.

How it works

Excess-q encoding cEX-q,n adds a fixed bias q to the number before encoding it in binary. Bit patterns then sort lexicographically in the same order as the encoded values, allowing hardware comparisons without decoding. For floating-point use one picks q = 2n-1 - 1 for a symmetric range. Range: -q to 2n - 1 - q.

When to use

Used in floating-point encoding cGK,k,n for the exponent (IEEE 754: float bias 127, double bias 1023).