# 27 - Floating Point Arithmetic (+ and - numbers)

1. In computing, floating-point arithmetic (FP) is arithmetic using formulaic representation of real numbers as an approximation. Read the excerpt below to fill in the blanks.
```Floating-point computation is often found in systems
which include ____________________________________,
which require fast processing times.```

None of the above

two's complement numbers

very small numbers and very large real numbers

2. Over the years, a variety of floating-point representations have been used in computers. However, since the 1990s, the most commonly encountered representation is that defined by the IEEE 754 Standard

FALSE

TRUE

3. A simple method to add floating-point numbers is to first represent them with the same exponent. What is happening in this example?
``` 123456.7 = 1.234567 × 10^5
101.7654 = 1.017654 × 10^2 = 0.001017654 × 10^5```

the second number is shifted right by three digits, and then the usual addition method is used

None of the above

the second number is shifted left by two digits and then the usual addition method is used

the first number is shifted left by three digits and then the usual addition is used

4. To add two floating point numbers, the ___________needs to be aligned before normal binary addition takes place.

exponents

ones

binary point

zeros

5. In the example below, what is happening at point 1 and 2?

None of the above

1. Making the exponents the same 2. Add the mantissa's together

TRUE

FALSE

7. What is the result of this addition?
`This is an example of adding with a negative exponent`

8. What is the result of this binary point subtraction?

9. In floating point addition it is important to determine which exponent is the smaller. Rewrite that number using the larger exponent, so that the two exponents are now the same.

FALSE

TRUE

10. It is important to be careful when adding numbers with very different exponents since significant error can be introduced.

FALSE

TRUE

11. Fortunately, two things that can never occur when performing floating point binary addition is the problem of overflow and underflow.

FALSE

TRUE

12. In the above example, ‘a’ and ‘b’ are two fixed point inputs and 'c’ is the output of addition of a and b. Since both the inputs are positive therefore output of a and b is ____________
```Example:When both a and b are positive
a=2.1=00000000000000010000110011001100
b=3.5 =00000000000000011100000000000000
c=a+b=5.6=000000000000001011001100110011000```

likely to result in an error (overflow)

positive

neutral

negative

13. Here a and b are negative numbers, so addition of two negative numbers is always _____________
```Example : When both a and b are negative
a=-2.1=10000000000000010000110011001100
b=-3.5 =10000000000000011100000000000000
c=a+b=-5.6=10000000000000101100110011001100```

positive

negative

neutral

likely to result in an error (overflow)

14. Here a and b are negative numbers, so subtraction of of two negative numbers is always ____________________
```Example: When both a and b are negative
a=-27.8=10000000000011011110011001100110
b=-19.6 =10000000000010011100110011001100
c=a-b=-8.2=10000000000001000100001101001111```

neutral

negative

positive

likely to result in an error (overflow)

15. ‘a’ and ‘b’ are two fixed point inputs and ‘c’ is the output of subtraction of a and b. Since both the inputs are positive therefore output of a and b is ___________
```Example (subtraction): When both a and b are positive
a=27.8=00000000000011011110011001100110
b=19.6 =00000000000010011100110011001100
c=a-b=8.2=00000000000001000100001101001111```

positive

likely to result in an error (overflow)

negative

neutral