dSpace GmbH DS1101 PCI Fixed Point Controller Board

Fixed versus Floating Point

Digital Signal Processing (DSP) can be divided into two categories, fixed point and floating point. These refer to the format used to store and manipulate numbers within the devices. Fixed point DSPs usually represent each number with a minimum of 16 bits (each digit is a bit), although a different length can be used. For instance, Motorola manufactures a family of fixed point DSPs that use 24 bits. Digital Signal Processors (DSP) have traditionally supported fixed-point arithmetic in computer hardware. But more recently, many DSP-enhanced RISC processors are starting to support fixed-point data types as part of their natural instruction (computer language) set. When the precision requirements of the application can be met with fixed-point arithmetic, then this is preferred since it can be smaller and more efficient (cost savings) than floating-point hardware.

The term floating point refers to the fact that the radix point (decimal point, or, more commonly in computers, binary point) can "float"; that is, it can be placed anywhere relative to the significant digits of the number. This position is indicated separately in the internal representation, and floating-point representation can thus be thought of as a computer form of scientific notation. Over the years, several different floating-point representations have been used in computers; however, the most commonly encountered representation is that defined by the IEEE 754 Standard.

The advantage of floating-point over fixed-point is that it can support a much wider range of values. The floating-point format needs slightly more storage (to encode the position of the decimal point), so when stored in the same space, floating-point numbers achieve their greater range at the expense of precision. By allowing the decimal point to be adjustable, floating-point notation allows calculations over a wide range of magnitudes, using a fixed number of digits, while maintaining good precision. For example, in a decimal floating-point system with three digits, the multiplication would write as

0.12 × 0.12 = 0.0144

In a fixed-point system with the decimal point at the left, it would be

0.120 × 0.120 = 0.014.

A digit of the result was lost because of the inability of the digits and decimal point to 'float' relative to each other within the digit string. The range of floating-point numbers depends on the number of bits or digits used for representation of the the significant digits of the number. On a typical computer system, a 'double precision' (64-bit) binary floating-point number is used. (53 digits one of which is implied and a "scientific notation" exponent of 11).

Software Code using Fixed versus Floating Point

Very few computer languages include built-in support for fixed point values, because for most applications, binary or decimal floating-point processing is usually simpler to use and accurate enough. Floating-point processing is easier to use than fixed-point processing, because they can handle a wider dynamic range and do not require programmers to specify the number of digits after the decimal point. However, if they are needed, fixed-point numbers can be implemented even in programming languages like C and C++, which do not commonly include such support. Some software libraries decode certain audio formats using fixed point processing. These codecs use fixed-point arithmetic because many audio decoding hardware devices do not have an Floating Point Unit (partly to save money, but primarily to save power - integer units are much smaller in silicon area than an Floating Point Unit) and audio decoding requires enough performance that a software implementation of floating-point on low-speed devices would not produce output in real time. In addition, all 3D graphics engines on Sony's original PlayStation, Sega's Saturn, Nintendo's Game Boy Advance (only 2D), Nintendo DS (2D and 3D) and GP2X Wiz video game systems use fixed-point arithmetic for the same reason: to gain throughput on an architecture without an FPU.

Why Use Fixed-Point Hardware?

Digital hardware is the primary means by which control systems and signal processing filters are implemented. Digital hardware can be classi