1.4.2 (Binary fractions) Flashcards
1
Q
What is a fixed point fraction?
A
- A way of representing a decimal in binary e.g 5.5 = 0101.1000
2
Q
What is the “.” called in a fixed point fraction?
A
- Binary point
3
Q
What is floating point binary?
A
- A way of representing a decimal using the least amount of bits
- e.g. 0.001*2^2 = 0.1
4
Q
What is a mantissa?
A
- A number to be multiplied by an exponent
5
Q
What is an exponent?
A
- A number representing the power to which a mantissa is to be multiplied by
6
Q
How do you add floating point numbers?
A
- Make the exponents the same, if increasing the exponent you must decrease the number, and vice versa
- Add the mantissas
7
Q
How do you subtract floating point numbers?
A
- Make the exponents the same, if increasing the exponent you must decrease the number, and vice versa
- Flip to 2sC
- Add the mantissas
8
Q
What is positive floating point normalisation?
A
- The sign bit is 0 and the next digit is a 1
- e.g. 0.1101
9
Q
What is negative floating point normalisation?
A
- The sign bit is 1 and the next digit is a 0
- e.g. 1.0111
10
Q
How do you add floating point numbers?
A
- Make the exponents the same
- Add the mantissas
11
Q
How do you subtract floating point numbers?
A
- Make the exponents the same
- Flip second number to 2sC
- Add the mantissas