P2 T1 L7 - Floating point numbers Flashcards

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

What are real numbers? (in the context of computing)

1 point

A
  1. In the context of Computing, Real Numbers are numbers with a fractional part.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Real numbers can be stored in ______ point and ______ point.

A

fixed

floating

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

Explain fixed point

1 point

A
  1. Fixed Point representation (where the point cannot move), they have a pre-determined number of bits before and after the point
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Explain floating point

1 point

A
  1. Floating Point (where the point does move), you get more accuracy and a larger range of numbers you can represent
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Layout of unsigned integer

A

Integer |

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

Layout of signed integer

A

sign | integer |

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

Layout of unsigned fixed point

A

integer | fraction |

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

Layout of signed fixed point

A

sign | integer | fraction |

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

Layout of floating point

A

sign | mantissa | sign | exponent |

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

(Fixed point)
Has a specific number of bits (or digits) reserved for the ______ part (the part to the left of the decimal point) and a specific number of bits reserved for the _______ part (the part to the right of the decimal point).

No matter how large or small your number is, it will always use the same number of bits for each portion.

Decimal point stays in the same position

Decimal point is not ______ (Does not take up any bit positions)

A

integer

fractional

stored

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

__________ is the process of moving the binary point of a floating point number to provide the maximum level of precision for a given number of bits

A

Normalisation

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

Why do we do normalisation?

3 points

A
  1. To make best use of the available bits
  2. To prevent a loss of bits causing a loss of accuracy
  3. Typically used to represent very large or very small numbers by storing a mantissa and an exponent in a 16-bit word (i.e. two bytes) or 32 bit.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the rules of normalisation?

3 rules

A
  1. Only 1 bit before the decimal point
  2. DENARY ONLY: the bit before decimal point must be non-zero (e.g. 3.255 * 10^1)
  3. BINARY ONLY: the bit before the decimal point is the sign (e.g. 0.1101 * 2^3)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the exponent?

1 point

A
  1. The exponent is used as a multiplier to move the mantissa to the correct ‘size’
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Convert the binary floating point number, 01101010, to a decimal, to denary.
(In this example the mantissa has 5 bits and the exponent has 3.)

(5 steps)

A
  1. Mantissa = 01101, Exponent = 010
  2. Insert decimal point (always goes between digits 1 and 2 OR between the sign and the mantissa) = 0.1101
  3. Exponent is positive (using 2s compliment), denary value = 2
  4. Move the decimal point 2 places to the right = 011.01
  5. Fixed point number to denary = 3.25
How well did you know this?
1
Not at all
2
3
4
5
Perfectly