Floating Point Numbers Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is fixed point

A
  • Position Values are set by the binary point
  • To the left they double in size (1,2,4)
  • to the right of the point they halve in size (0.5, 0.25, 0.125)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

how does the computer remember the position of the point

A

set by the software in use, or occasionally the hardware of the processor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is range

A

The difference between the highest and lowest numbers that can be represented

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is precision

A

the smallest possible fraction that can be represented

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what happens if the number of bits is limited?

A

There is a trade- off between range and precision.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the two elements of a floating point number?

A

mantissa- the pattern of 1s and 0s
exponent - the power of 2 / how much it is to be shifted.

  • both are stored with two’s complement
  • bits for each vary depending on the question
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How does a normalised mantissa begin?

A

an 01 or a 10. The binary point is between the 1 and 0.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

evaluate fixed vs floating point

A

Fixed point : Less processing, therefore quicker.
Floating point: maximum range and precision.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How to convert floating to fixed point.

A
  1. the binary point in the (normalised) mantissa is after the first digit
  2. find the value of the exponent.
  3. If it is positive, shift the binary point on the mantissa to the right that many places.
  4. If it is negative, shift it to the left that many places. this will create empty spaces. Fill these with the bit value (1 or 0 ) that the mantissa starts with.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How to convert fixed to floating point

A
  1. find the mantissa - the first 01 or 10 of the number, and all the 1s and 0s after it
  2. the point of the mantissa is between the 1 and the 0.
  3. how many hops would it take to move the binary point from that position, to where it belongs in it’s fixed form?
  4. That number is the exponent.

(if hopped left, exponent is negative. otherwise, positive)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How to normalise a floating point number

A
  1. remove “spare” 0s or 1s from the front of the mantissa until it starts with 01 or 10.
  2. how many you removed, subtract that number from the exponent.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How to add two floating point numbers

A
  1. find the smaller exponent, make it lager to match the other
  2. how much did you add? add that many 1s or 0s to the start of the mantissa
  3. Now add the mantissas together. The two nums have the same exponent.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly