Chapter 2: Floating Point Numbers and Rounding Flashcards

1
Q

What is truncation?

A

Dropping unwanted bits, rounding toward zero, rounding down

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

What is rounding toward +- infinity?

A

rounding up, essentially rounding to the nearest possible floating-point number while increasing the magnitude

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

What is rounding to the nearest?

A

rounding to the closest possible floating-point number irrespective of direction

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

What is normalization?

A

When a number is made such that there is only one non-zero digit leading the radix point and an exponent is made to compensate the shifting of the radix point

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

Explain how to normalize a fractional binary value

A

A

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

What is the Significand also called?

A

Mantissa

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

What is the significand/mantissa?

A

The significant bits of a normalized number

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

What is the significand/mantissa represented in?

A

sign and magnitude format (leading bit is the sign bit)

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

How many unique zeros are there in IEEE-754 format?

A

2:

00000000000000000000000000000000) and (10000000000000000000000000000000

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

What is the general bias of 32-bit IEEE-754 format?

A

127

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

What does the leading bit of IEEE-754 format represent?

A

The sign

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

What do the 8 bits after the first bit represent in IEEE-754 format?

A

The biased exponent

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

What do the final 23 bits in IEEE-754 format represent?

A

The fractional bits

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

When normalizing a binary number for IEEE-754 format, what is removed?

A

The leading 1 to the left of the radix point

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

If every digit but possibly not the first is a 0 in IEEE-754 format, the number is:

A

+- zero

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

If the exponent is all zeros, but there is at least one non-zero bit in the mantissa in IEEE-754 format:

A

The number is un-normalized and the bias is 126

17
Q

What is the one case where the bias of IEEE-754 format is 126 not 127?

A

If the exponent is all zeros, but there is at least one non-zero bit in the mantissa

18
Q

If the exponent is all 1’s and there is NO fractional bit in IEEE-754 format, the number is:

A

Either +- infinity

19
Q

If the exponent is all 1’s and there is at least one non-zero fractional bit in IEEE-754 format, the number is:

A

NaN (Not a Number)

20
Q

Explain floating-point arithmetic:

A

Make the exponents the same and then perform addition or subtraction

21
Q

For floating-point arithmetic, if the difference between the two exponents of the normalized two numbers is greater than the number of significant bits:

A

The addition result of these two numbers will be the larger of them

22
Q

For floating-point arithmetic, when will the addition result of these two numbers be the larger of them?

A

If the difference between the two exponents of the normalized two numbers is greater than the number of significant bits

23
Q

What is the smallest possible normalized value to be represented in IEEE-754 format?

A

+- E = 1, F = 0x000000

+- 1.17549 x 10^-38

24
Q

What is the largest possible normalized value to be represented in IEEE-754 format?

A

+- E = 254, F = 0x7FFFFF

+- 3.40282 x 10^38

25
Q

How many many possible NaN values can be represented in IEEE-754 format in TOTAL?

A

((2^22) - 1) * 2

possible NaN values

26
Q

How many many possible NaN NEGATIVE values can be represented in IEEE-754 format in?

A

((2^22) - 1)

possible NaN values

27
Q

How many many possible NaN POSITIVE values can be represented in IEEE-754 format in?

A

((2^22) - 1)

possible NaN values