This example shows the “floating” decimal point which appears on different positions in the number x depending on the exponent y. The number 523.0 for example can be written in scientific notation as 523.0* 10 0, 52.30* 10 1 or 5.230* 10 2. The base 10 scientific notation is x* 10 y and it allows the decimal point to be moved around. The floating point format uses the scientific notation which is a form of writing numbers which are too big or too small to conveniently write in decimal form. Why is it called “floating point”?Īs the name suggests, the point (decimal point) can float. Depending on the use, there are different sizes of binary floating point numbers. A binary floating point number is a compromise between precision and range. It would need an infinite number of bits to represent this number. Imagine the number PI 3.14159265… which never ends. However, floating point is only a way to approximate a real number. This is where floating point numbers are used. To represent all real numbers in binary form, many more bits and a well defined format is needed. However, this only includes whole numbers and no real numbers (e.g. A binary number with 8 bits (1 byte) can represent a decimal value in the range from 0 – 255.
0 Comments
Leave a Reply. |