difference between fixed point and floating point

Fixed point and floating point (part one)

Fixed point.

Numerical system in computer can be separated into 2 group , one is Floating point and another one is Fixed point. Floating point is mainly
used in calculation of software that run on PC. In PC there is the FPU or Floating Point Unit so it is possible to use floating point numerical system.
On the other hand , in embedded system , the capability of main processor is limit and maybe there’s no FPU so in calculation , the usablility of Fixed point
instead of Floating point is necessary.

Fixed point is numerical system that use binary number or bit (0 and 1) to represent an integer , rational number or signed integer (such as -1,-3,-5).
Most people think that fixed point is the system that used for calculated only integer but in fact , it can be used for calculate an integer , rational number and signed integer too.

The difference between Fixed point and Floating point.

First , let me talk about rational number…

Rational number is derive from the representation of ratio of two integer A and B or A/B. You can write rational number in decimal format
such as 12.25 , 1.10 , etc. The symbol between integer part and fractional part is called “decimal point” or “radix point”. Position of radix point in the rational
number can be anywhere depend on the significance of that number.

Fixed point number represent the number that the position of radix point is fixed and not change even though that number is modified by the
computation process.This mean that in Fixed point the number of digits come after the radix point is also fixed too.

Floating point number represent the number that the position of radix point is “floating” (not fixed at any position). The position of radix point
can be changed during number is modified in computation process. Or this mean the number of digits come after the radix point can be varied (not fixed).

From the above information, when compare Floating point with Fixed point , range of number can be represented by floating point is larger than fixed point.
Floating point is suitable in the task that require intensive computation such as Hi-Fi Audio System, Radar System, Medical Electronics system , etc.
General purpose computer is mainly use Floating point too. The popular programming language like C and C++ are also not support the fixed point , however
there’re many existing fixed point math libraries able to use with C and C++. The IEEE Standard for Floating point Arithmetic is IEEE 754 and this standard is
implemented into both hardware (FPU) and software of computer.

In next article (Part two) will be about the advantage of fixed point.

Thank you,