Question: The algorithms for the floating-point arithmetic operations in Sec. 10-5 neglect the possibility of exponent overflow or underflow. a. Go over the three flowcharts and
The algorithms for the floating-point arithmetic operations in Sec. 10-5 neglect the possibility of exponent overflow or underflow.
a. Go over the three flowcharts and find where an exponent overflow may occur.
b. Repeat (a) for exponent underflow. An exponent underflow occurs if the exponent is more negative than the smallest number that can be accommodated in the register.
c. Show how an exponent overflow or underflow can be detected by the hardware.



10-5 Floating-Point Arithmetic Operations Many high-level programming languages have a facility for specifying floating- point numbers. The most common way is to specify them by a real declaration statement as opposed to fixed-point numbers, which are specified by an integer declaration statement. Any computer that has a compiler for such high-level programming language must have a provision for handling floating-point arithmetic operations. The operations are quite often included in the internal hardware. If no hardware is available for the operations, the compiler must be designed with a package of floating-point software subroutines. Although the hardware method is more expensive, it is so much more efficient than the software method that floating-point hardware is included in most computers and is omitted only in very small ones. Basic Considerations Floating-point representation of data was introduced in Sec. 3-4. A floating- point number in computer registers consists of two parts: a mantissa m and an exponent e. The two parts represent a number obtained from multiplying m times a radix r raised to the value of e; thus mx r The mantissa may be a fraction or an integer. The location of the radix point and the value of the radix r are assumed and are not included in the registers. For example, assume a fraction representation and a radix 10. The decimal number 537.25 is represented in a register with m = 53725 and e = 3 and is interpreted to represent the floating-point number .53725 10
Step by Step Solution
3.45 Rating (165 Votes )
There are 3 Steps involved in it
a Where exponent overflow may occur An exponent overflow occurs when the resulting exponent exceeds ... View full answer
Get step-by-step solutions from verified subject matter experts
