Sunday, 9 October 2016

Floating Point Numbers


• What kind of rounding error can occur in Denary?

There is a problem with rounding when we have recurring numbers like 1/3. We have 0.333333333333...If we add 1/3+1/3+1/3 them we usually round it to 1. even though we know it is 0.99999999.




• What kind of rounding error may happen in Binary?

In binary if you have a recurring number like 1/3 then the computer will eventually run out of bits to store the 1/3 so it will not truly be 1/3. this means there will be tiny errors in calculations where numbers cannot properly be represented and the computer has to round to give what is thinks is the correct answer.




• Why use Floating Point? 

We use Floating point because it is is much more efficient. This means it takes up less space to store the numbers and it is much easier for the computer to do calculations so it is much faster.

\underbrace {\overbrace {0}^{{\text{sign bit}}}\cdot 101010101}_{{\text{mantissa}}}\times \underbrace {010101}_{{\text{exponent}}}

• What is meant by the mantissa? What is meant by the exponent?


The first bit defines the non-zero part of the number and is called the Mantissa, the second part defines how many positions we want to move the decimal point, this is known as the Exponent and can be positive when moving the decimal point to the right and negative when moving to the left.
Both the mantissa and the exponent is in twos complement format. So if there is a 1 present in the leftmost bit of the mantissa, then this is a negative binary number.

• Can you convert the following 6 bit mantissa and 4 bit exponent into denary 0.10100 0100?

01010.0
=10,0



No comments:

Post a Comment