Fixed Point Representation: Q-formats


Fixed point number representations are termed as Q-point format(As IEEE 754 standard for floating point representation).

Let us start with the basic notation of a Q-point for a fixed point number.

Convention is as follows

Q [QI]. [QF]

QI -> Integer bits

QF -> Fraction bits

So sum of QI and QF gives the total number of bits that is needed to represent a number in fixed point format.

QI + QF = Word length and this word length corresponds to variable widths supported on various processors. Typical word lengths would be 8, 16 and 32-bit.

For example: Q2.6 number would be an 8-bit number with 2 integer bits and 6 fraction bits.

Fixed point range – Integer portion

The range of a floating point variable in an algorithm sets the number of bits (QI) required to represent the integer portion of the number.

This relationship for unsigned numbers is defined by the equations:

0 ≤ α ≤ 2QI

Where α is floating point variable.

(We will see few examples on this in coming sessions)

If floating point number is a singed value.

-2(QI-1) ≤ α ≤ 2(QI-1)

Where α is floating point variable.

Resolution of a fixed point number – Fractional portion:

The resolution of a fixed point number is set by the remaining fraction bits (QF) for a given word length (WL) for the variable. For a given word length and dynamic range of a variable the resolution is limited. If higher resolution is needed for a given range then the WL of the variable must be increased to provide this resolution.

The resolution ε, of a fixed point number is as follows

ε = 1/ (2QF)

Therefore the number of fractional (QF) bits required for a particular resolution is defined by the equation.

QF = log2 (1/ ε)

However since QF is a integer values only, the results of logarithm result:

QF = celling (log2 (1/ ε))

We will discussion more and in detail math on fixed point numbers in coming posts.

Thanks and have a nice reading

1 comment:

  1. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Machine Learning , kindly contact us
    MaxMunus Offer World Class Virtual Instructor led training on TECHNOLOGY. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Sangita Mohanty
    Skype id: training_maxmunus
    Ph:(0) 9738075708 / 080 - 41103383


Related Posts

Twitter Updates

Random Posts

share this post
Bookmark and Share
| More
Share/Save/Bookmark Share