15 Fixed and Floating-Point arithmetic Flashcards
Fixed point numbers?
Binary fixed point numbers?
What is the decimal representation of 1101.101?
13.625
There are two ways of representing signed numbers:
1) sign/magnitude notation
2) two‘s complement notation
What is the fixed point representation of -2.375?
Arithmetic with fixed point numbers
Compute the following: 0.75 + (-0.625)
How are Fixed point numbers represented in a computer?
8 bit fixed point number range?
Range of values with 8 bits: +7.9375, -7.9375
Why do we need floating point numbers?
The normal scientific notation is of the form for floating point integers?
The number 4.1x103 , which is the decimal scientific notation of 41000, has positive sign, mantissa of 4.1, base of 10 and exponent of 3. Here the decimal point floats to the position right after the most significant bit.
In binary floating point representation, the mantissa is composed of 0s and 1s, and the base is always 2.
8 bit Floating point numbers represented in a computer
How do we store a 8 bit floating point number with a negative exponent?
Formula to obtained the bias number?
Adding the bias to the exponent, we get the 32-bit representation defined by the IEEE 754 floating point standard.
The Floating point range with the 32 and 64bit IEEE 754 standard?
IEEE standard special cases?
Rounding options?
There are a range of options when considering how to round an arithmetic result • Down • Up • Nearest (Default)
Overflowing and underflowing
A value that gets to large Overflows and is set to + or - infinity if it is to large a negative number A value that is too small Underflows and is set to zero
The steps for adding floating-point numbers with the same sign are as follows:
- Extract exponent and fraction bits.
- Prepend leading 1 to form the mantissa.
- Compare exponents.
- Shift smaller mantissa if necessary.
- Add mantissas.
- Normalize mantissa and adjust exponent if necessary.
- Round result.
- Assemble exponent and fraction back into floatingpoint number.