3.5.4.4 Numbers With a Fractional Part. Flashcards

1
Q

Outline the us of fixed point representation.

A

Used if we want to represent fractions.

We can fix the decimal point by defining our byte to represent fractions (but not actually storing the point).

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

How do we represent decimals and what does this involve?

A

Ways we can represent decimals:
325.5 can be represented as 0.3255 x 10^3

This way of representing numbers in different forms involves moving (floating) the decimal point to a new position.
We need a consistent method of representing decimals.

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

Outline the process of floating point notation.

A

In floating point notation, real numbers are represented in the following way:

  • A sign ( 0 indicates a positive, 1 a negative number).
  • some significant digits expressed as a number with a fractional part (mantissa).
  • and an integer power of 2 (exponent).

0●1011000 0011
mantissa exponent.

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

When is the implied binary point?

A

The implied binary point is always after the first digit.

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

What is the exam question structure for Floating Point Numbers.

A

Exam questions will use 12 bit numbers:
8 bits for the mantissa
4 bits for the exponent.

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

How to calculate floating point numbers.

A

Find the sign of the mantissa - if the mantissa is negative perform two’s compliment.

  • Find the value of the exponent (positive or negative).
  • Move the decimal point the distance the exponent asks for (add up the positive values in the exponent) (right for a positive exponent, left for a negative exponent).
  • Starting at the decimal point, work out the value of the mantissa.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define a mantissa.

A

The number you want to store.

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

Define an exponent.

A

The position of the binary point in the number.

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

What must we remember about the exponent?

A

The exponent does not form part of the end number.

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

Outline how to float the binary point when working with a negative exponent.

A

Shift the entire binary number however many values specified by the exponent in the binary waiting line, add 0’s.

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

Outline the need for normalisation.

A

Normalisation overcomes the loss of a less significant bit, which will then lead to an unnecessary error, when there are leading zeros before the least significant bit.

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

Outline normalised floating point numbers.

A

With a fixed number of bits, a normalised representation of a number will display the number to the greatest accuracy possible.

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

Summarise what normalised numbers do.

A

In summary normalised numbers:
Give only one representation of a number.
Save space.
Give the most accurate representation of a number in a given number of bits.

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

Outline how to normalise.

A

The first two digits must be different.

  • 0.1 (positive)
  • 1.0 (negative)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Examples of normalisation:

A

(after floating point notation)

1101.1010 is normalised as 1.0110100 0011.

00101 normalised as 0.101000 1010

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

Outline precision in both the mantissa and exponent.

A

There needs to be a decision between the range of a number and the precision.
- If you want a very precise number, use more digits for the mantissa and less for the exponent as this will allow for more decimal places.
If you want a large range of numbers, use more digits for the exponent and less for the mantissa.

17
Q

Outline what is meant by a rounding error in floating point notation.

A

When we try to represent some numbers but cant within the space we are given.
E.g. 1/3 = 0.33333333….etc.

18
Q

What will occur if we cannot get perfect precision?

A

This can lead to errors, namely, a rounding error.

19
Q

Define an absolute error.

A

The difference between the target number and the closest number achieved.

20
Q

Define a relative error.

A

The percentage difference between the target number and the rounded value.

21
Q

Example of an absolute error:

A

If I want to represent 23.27 in binary, and the closest I can get is 23.25, then the absolute error is (23.27 - 23.25) 0.02.

22
Q

Example of a relative error:

A

If I want to represent 23.27 in binary, and the closest I can get is 23.25, then the relative error is (23.27 - 23.25) /23.27 - 0.09%.

23
Q

Outline an underflow error.

A

Occurs when the exponent is too small to be displayed accurately in the number of bits available.

24
Q

Outline an overflow error.

A

Occurs when the exponent is too large to be displayed in the number of bits available.
Essentially, the opposite of and underflow error.

25
Q

Outline a cancellation error.

A

This type of error occurs during the subtraction of two very similar values where most of the significant digits are lost.