Custom Search

Biased representation

If we have numbers ranging from -8 to +8 we can remove the sign by adding 8 to all of or numbers. The numbers would then be 0 to +16. It is rather like shifting the scale (as in converting Celsius to Kelvin) to obtain only positive values.

This representation allows operations on the biased numbers to be the same as for unsigned integers, but actually represents both positive and negative values.

This method is called by several names - Excess-K, also called offset binary or biased representation, uses a fixed value K as a biasing value.

A value is represented by the unsigned number which is K greater than the intended value.

Thus 0 is represented by K, and −K is represented by the all-zeros bit pattern. This can be seen as a slight modification of two's-complement, which is virtually the excess-2N−1 representation with negated most significant bit.

Biased representations are now primarily used for the exponent of floating-point numbers. The IEEE floating-point standard defines the exponent field of a single-precision (32-bit) number as an 8-bit excess-127 field.

Biased Representation Examples

Examples 1: given 4 bits, bias values by 23 (8)

TRUE VALUE to be represented = 3

add the bias 3 + 8 = 11

unsigned value +11

Thus, 3 in 4-bit biased-8 representation will be 1011

Example 2: given a biased-8 representation as 0110 what is the true value?

unsigned 0110 represents decimal 6

subtract out the bias 6 - 8 = -2

TRUE VALUE represented -2