An 8-digit base 10 representation of the number 1234.567 = 1.234567 * 10^{3} would be 31234567. The 8-digit base 10 representation can be broken up into two parts. The first digit is the exponent, in this case 3. The following 7 digits are the significant digits, or mantissa. Notice that this representation assumes that the decimal place for the mantissa is after the first digit.

The advantage to reprsenting numbers using floating points is that it is possible to represent a much larger range of numbers. Fixed point notation when limited to a certain number of digits must always assume that the decimal is in the same place. For example if an 8-digit base 10 fixed point representation assumes that there are four digits to the left and four digits to the right of the decimal point then the largest number that could be represented is 99999999 = 9999.9999. With the floating point representation used above the largest number that could be represented is 99999999 = 9.999999 * 10^{9} = 9,999,999,000.

A problem with fixed point representation is that fewer numbers between the maximum representable number can be represented. For example 9,999,999,000-1 = 9,999,998,999 = 9.999998999 * 10^{9}. Except that the mantissa in this case has more than 7 digits, so it would have to be rounded to 9.999999 * 10^{9} in order to be stored in an 8-digit base 10 floating point number. This leads to the peculiar behavior where 9,999,999,000 - 1 = 9,999,999,000.

Floating point arithmetic is similar to scientific notation arithmetic. For example in order to add 1.234567 * 10^{3} and 7654321*10^{2} the operand with the lower base is converted to the same base as the other operand and the mantissas are added. So, 1.234567 * 10^{3} + 7.654321*10^{2} is equivalent to 1.234567 * 10^{3} + 0.7654321*10^{3}, which is:

1.2345670 * 10Notice that the mantissa the the answer is 8 digits, which is larger than our 8-digit representation allows, so the actual sum, 1999.9991, would be rounded to 1999.999. In this case the answer is off by just one-ten-thousandth. But there are other cases when strange behavior can occur. For example, when two numbers of much different size are added:^{3}+0.7654321 * 10^{3}--------------- 1.9999991 * 10^{3}

1.234567 * 10When 7.6543211234567 * 10^{3}=> 0.0000001234567 * 10^{9}+7.654321 * 10^{9}=> +7.6543210000000 * 10^{9}-------------- ------------------ 7.6543211234567 * 10^{7}

Floating point multiplication is also very similar to scientific notation multiplication, mantissa are multiplied while exponents are added. For example:

1.234567 * 10Which, when rounded to account for the 7 digit mantissa is 9.449772 * 10^{3}*7.654321 * 10^{3}-------------- 9.449772114007 * 10^{6}

Rational numbers are represented in binary in the same way as decimal numbers.
For example, the 8-digit fixed point decimal number 0003.7500 is equivalent to 30*10^{0}+7*10^{-1}+5*10^{-2} = 3.0+0.7+0.05. This same number in 8-bit fixed point binary would be 0011.1100, which is equivalent to 2^{1}+2^{0}+2^{-1}+2^{-2} = 3.75. This same number in 8-bit binary floating point notation would be 00111110. The first three digits are the exponent and the last five are the mantissa. So, in binary scientific notation it is equivalent to 1.111 * 2^{1} = 1.875*2 = 3.75.

Final note, because rational numbers in binary are a sum of 2's raised to some power, only numbers with a denominator that is a power of two can be represented. For example 3.75 = 2^{1}+2^{0}+2^{-1}+2^{-2}, which is a sum of 2's raised to some power. 0.1 = 2^{-1}+2^{-2}+2^{-5}+2^{-6}..., which is an infinite sum that can not be represented with a finite number of bits, so it would be rounded. This is why often when you are writing code if you enter a literal double value it will print a very long sequence of digitis that are close to the number you entered, but not the same.

- 0.843
- 345.099
- 45386

- 0.843
- 345.099
- 45386

- 3.439*10
^{3}+1.48278*10^{2} - 8.762*10
^{7}*2.08*10^{2}

- 0100.0010
- 0101.0101

- 0100.0010
- 0101.0101

- 0100.0010
- 0101.0101