Floating/Fixed Point Binary Flashcards

1
Q

What is Overflow?

A

Overflow occurs when a number exceeds the maximum value that can be represented.

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

What is Underflow?

A

Underflow happens when the number is smaller than the minimum representable value which could happen or small negative values.

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

Fixed-Point vs Floating-Point

A

Fixed-Point:
* Very accurate
* Limited Range
* Faster and more efficient
* Less Memory Usage
* Simple, real-time tasks

Floating-Point:
* Flexible precision
* Very wide range
* Slower the uses more resources
* Uses More Memory
* Complex Calculations

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

What is Fixed-Point Representation?

A

A way to represent real numbers as integers with a fixed position for the decimal point. The number of bits used for the integer and fractional parts is fixed.

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

How are Fixed-Point Numbers Stored?

A

A fixed number of bits are allocated for the integer and fractional parts. Example: In an 8-bit system with 4 bits for integer and 4 bits for fractional, the number is split as
xxxx. yyyy
(integer and fractional part).

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

Range of Fixed-Point Representation?

A

Formula for Range: For an N-bit system with I integer bits and F fractional bits:
Maximum = 2^(I-1) - 2^-F
Minimum = -2^(I-1) + 2^-F (for signed numbers)
Example: For 8 bits with 4 integer bits, the range is -8 to 7.9375.

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

Disadvantages of Fixed-Point Representation?

A

Limited Range: Can’t represent very large or very small numbers.
Less Flexibility: Precision is fixed for the fractional part, so it’s not good for a wide dynamic range.

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

What is Floating-Point Representation?

A

Definition: A method to represent real numbers using scientific notation. It has two parts: mantissa (significant digits) and exponent (scaling factor), allowing for a wide range of numbers

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

Structure of Floating-Point Numbers?

A

IEEE 754 Standard:
* Single Precision (32-bit): 1 bit for sign, 8 bits for exponent, and 23 bits for mantissa.
* Double Precision (64-bit): 1 bit for sign, 11 bits for exponent, and 52 bits for mantissa.

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

What is the Exponent Bias in Floating-Point?

A

*Exponent Bias: The exponent is stored with a bias. In single precision, the bias is 127. This allows both positive and negative exponents to be represented.
* Formula: Actual exponent = stored exponent - bias.

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

What is Normalization in Floating-Point?

A
  • Normalization: A technique where the mantissa is adjusted so that it falls within a specific range, typically between 1 and 2 (in binary). This allows the most efficient use of available bits.
  • Example: 0.0000011 becomes 1.1 × 2^-6
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Range of Floating-Point Numbers?

A
  • Single Precision: The range is approximately 1.4 × 10^-45 to 3.4 × 10^38.
  • Double Precision: The range is approximately 5.0 × 10^-324 to 1.8 × 10^308.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

. What is Underflow in Floating-Point?

A

Underflow happens when a number is too small to be represented in normal form, so it’s stored as zero or a very small denormalized number.

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

What is Overflow in Floating-Point?

A

Overflow occurs when a number exceeds the maximum representable value and results in a special value like infinity.

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

Disadvantages of Floating-Point Representation?

A
  • Slower: Floating-point arithmetic is more complex and slower than fixed-point.
  • More Memory: Requires more bits to store (32-bit or 64-bit).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly