Floating-point arithmetic Flashcards
What numbers can we store exactly on a computer?
Integers up to some maximum size
What is the largest possible number than can be stored using 64-bit?
Assuming one bit is used to store the sign ±, the largest possible number is 263 - 1
What is fixed point representation?
What is (10.1)2
1 x 21 + 0 x 20 + 1 x 2-1 = 2.5
With fixed-point numbers are any numbers ever the same?
No - every number has a unique representation
What is a problem with fixed-point representation?
Easy to “escape”
What is meant by fixed-point representaion being easy to escape?
Numbers like (0.01)10(0.10)10 = (0.001)10 can’t be represented.
What is floating-point representation?
What is the (0.d1d2…dm)β in the following called?
- Fraction
- Significand
- Mantissa
What is β and e in the following called?
- Base
- Exponent
What is one advantage and disadvantage to usinh floating point numbers over fixed point numbers?
- You can represent a much larger range of numbers in a floating-point representation
- However the numbers in floating-point representation are not equally spaced
In floating-point numbers if d1 ≠ 0 then each number in F has a unique representaion and is called?
Normalised
What is the IEEE?
A standard for double-precision (64 bit) arithmetic
What are the 64 bits used in the IEEE standard?
- 52 bits for the fraction
- 11 for the exponent
- 1 for the sign
What is the IEEE representation?