2
$\begingroup$

I'm reading up on DSP implementations and Q number format for representing decimal and decimal fractional numbers. Why would you use the Q format and not a standard like IEEE 754? When would you use one instead of the other? They both encode numbers into a sequence of bits, right?

$\endgroup$
8
$\begingroup$

Q format numbers are fixed-point, which means they can be manipulated by integer ALUs, rather than needing to use a floating-point unit. In a DSP setting, this is useful for greater speed and lower power consumption, since fixed-point arithmetic is much simpler than floating-point. On the other hand, the main advantage of using a floating-point representation is greater dynamic range.

$\endgroup$
5
$\begingroup$

Addition and subtraction usimg floating point representations requires a normalization step at the end, which requires more instructions in a software FP implementation and more transistors and longer (thus probably having higher electrical capacitance) wires in a hardware implementation. Thus, depending on the DSP implementation, using floating point may incur a higher transistor, time and/or energy cost over scaled integer formats that do not require a normalization step.

However, many modern processors have such fast floating point (or slow integer multiplies) that this difference may be impossible to measure, or even negative.

$\endgroup$
  • 2
    $\begingroup$ The last sentence is the key. Fixed-point processing is commonly done in embedded DSP processors and FPGAs, but signal processing done on powerful platforms like PCs/servers is typically done all in floating-point (in many cases with single-precision floats instead of double, for speed). $\endgroup$ – Jason R Mar 20 '13 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.