floating point Flashcards
Converting from FP to denary?
- Convert exponent to denary.
- If its negative move binary point left (adding 1’s if mantissa is negative and 0’s if its +ve)
- If its positive move binary point right
- Convert New mantisa.
Converting from twos comp to binary?
starting from the right, leave every bit until the first 1. Then flip all the bits after this 1.
Converting from denary to FP?
- Convert to Binary
- Twos completment this
- Figure out how much you need to move the BP to get normalised form?
- Create the exponent of this number (with correct sign, negative number was a fraction, +ve number was >1)
What is the normalised form?
- Positive starts with 0.1
- Negative Starts with 1.0
WHy is normalised form good?
- Maximises precision for given number of bits
- Unique representation of each number
Why is fixed point used?
As it has a larger randge of number in the same number of bits as fixed point representation.
What does storing something in excess 127 mode mean?
that 127 was added to the exponent before it was stored.
LArgest positive number?
Matissa : 0.11111 etc
Exponent 01111 etc
Smallest positive number
mantissa : 0.1000000 etc
exponent: 10000000 etc
Largest negative number
mantissa : 1.0000000 etc
exponent: 0111111111 etc
smallest negative number
mantissa : 1.0111111 etc
exponent: 100000 etc
Two tpes of rounding error?
- Absolute error
- Relative error
What is the relative error?
The absolute erro divited by the required value
what is the absolute error?
The differenc ebetween the actual number and the nearest representable value
What is presision?
the maximum numbe rof significant digits that can be represented.
(determined by mantissas bits)