Question

In: Computer Science

please can someone explain me showing up the steps: Let 4284000016 and 3c82000016 represent two floating...

please can someone explain me showing up the steps:

  1. Let 4284000016 and 3c82000016 represent two floating point numbers in IEEE single-precision FP format.

    1. Determine the decimal values of the two numbers.

    2. Add the two numbers and show the result both in IEEE single-precision FP format and in decimal.

    3. Multiply the two numbers and show the result both in IEEE single-precision FP format and in decimal.

Solutions

Expert Solution

IEEE Standard Floating Point Numbers
The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation which was established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard addressed many problems found in the diverse floating point implementations that made them difficult to use reliably and reduced their portability. IEEE Standard 754 floating point is the most common representation today for real numbers on computers, including Intel-based PC’s, Macs, and most Unix platforms.
There are several ways to represent floating point number but IEEE 754 is the most efficient in most cases. IEEE 754 has 3 basic components:
1. The Sign of Mantissa – This is as simple as the name. 0 represents a positive number while 1 represents a negative number.
2. The Biased exponent – The exponent field needs to represent both positive and negative exponents. A bias is added to the actual exponent in order to get the stored exponent.
3. The Normalised Mantisa – The mantissa is part of a number in scientific notation or a floating-point number, consisting of its significant digits. Here we have only 2 digits, i.e. O and 1. So a normalised mantissa is one with only one 1 to the left of the decimal.
IEEE 754 numbers are divided into two based on the above three components: single precision and double precision.
Example – 85.125 85 = 1010101 0.125 = 001 85.125 = 1010101.001 =1.010101001 x 2^6 sign = 0 1. Single precision: biased exponent 127+6=133 133 = 10000101 Normalised mantisa = 010101001 we will add 0's to complete the 23 bits The IEEE 754 Single precision is: = 0 10000101 01010100100000000000000 This can be written in hexadecimal form 42AA4000 2. Double precision: biased exponent 1023+6=1029 1029 = 10000000101
Normalised mantisa = 010101001 we will add 0's to complete the 52 bits The IEEE 754 Double precision is: = 0 10000000101 0101010010000000000000000000000000000000000000000000 This can be written in hexadecimal form 4055480000000000
Special Values: IEEE has reserved some values that can ambiguity.
 Zero – Zero is a special value denoted with an exponent and mantissa of 0. -0 and +0 are distinct values, though they both are equal.
 Denormalised – If the exponent is all zeros, but the mantissa is not then the value is a denormalized number. This means this number does not have an assumed leading one before the binary point.
 Infinity – The values +infinity and -infinity are denoted with an exponent of all ones and a mantissa of all zeros. The sign bit distinguishes between negative infinity and positive infinity. Operations with infinite values are well defined in IEEE.
 Not A Number (NAN) – The value NAN is used to represent a value that is an error. This is represented when exponent field is all ones with a zero sign bit or a mantissa that it not 1 followed by zeros. This is a special value that might be used to denote a variable that doesn’t yet hold a value.
Similar for Double precision (just replacing 255 by 2049), Ranges of Floating point numbers:
The range of positive floating point numbers can be split into normalized numbers, and denormalized numbers which use only a portion of the fractions’s precision. Since every floating-point
number has a corresponding, negated value, the ranges above are symmetric around zero.
There are five distinct numerical ranges that single-precision floating-point numbers are not able to represent with the scheme presented so far:
1. Negative numbers less than – (2 – 2-23) × 2127 (negative overflow)
2. Negative numbers greater than – 2-149 (negative underflow)
3. Zero
4. Positive numbers less than 2-149 (positive underflow)
5. Positive numbers greater than (2 – 2-23) × 2127 (positive overflow)
Overflow generally means that values have grown too large to be represented. Underflow is a less serious problem because is just denotes a loss of precision, which is guaranteed to be closely approximated by zero.
Table of the total effective range of finite IEEE floating-point numbers is shown below:
BINARY DECIMAL
Single
± (2 – 2-23) × 2127
approximately ± 1038.53
Double
± (2 – 2-52) × 21023
approximately ± 10308.25
Special Operations – OPERATION RESULT
n ÷ ±Infinity
0
OPERATION RESULT
±Infinity × ±Infinity
±Infinity
±nonZero ÷ ±0
±Infinity
±finite × ±Infinity
±Infinity
Infinity + Infinity Infinity – -Infinity
+Infinity
-Infinity – Infinity -Infinity + – Infinity
– Infinity
±0 ÷ ±0
NaN
±Infinity ÷ ±Infinity
NaN
±Infinity × 0
NaN
NaN == NaN
False


Related Solutions

Can someone please explain to me the steps in journalizing events in accounting and then turning...
Can someone please explain to me the steps in journalizing events in accounting and then turning them into income statements. Like which assets and liabilities are credits and which are debits?
Please can someone explain this to me. I am stuck at the last two questions Use...
Please can someone explain this to me. I am stuck at the last two questions Use the following information to calculate your answers to questions 10 through 14. Test scores of 10 individuals before and after a training program are shown below. Note: despite the sample size, assume that the sampling distribution of T+ can still be approximated by a normal distribution. Individual Score After the Program Score Before the Program 1 57 59 2 62 57 3 60 60...
Can someone show me how to break this down by steps please and thank you. You...
Can someone show me how to break this down by steps please and thank you. You sell short 200 shares of a stock at $95 on a 60% initial margin requirement with a 30% maintenance margin. In 3 months, the stock is $79. What is your margin at this time? When would a margin call occur? If you cover your position when the stock is $79, what would be your HPR? Assume you did the same trade as before but...
*will someone please explain/show the steps in this process for me? Thank you so much! Amy...
*will someone please explain/show the steps in this process for me? Thank you so much! Amy company produces and sells a toy for $205 per unit. In the first year of operations, 100,000 units were produced and 75,000 were sold. other information for the year includes: direct materials $31 per unit direct manufacturing labor $3 per unit variable manufacturing overhead costs $4 per unit sales selling expenses $4 per unit total fixed manufacturing costs $1,250,000 total fixed administrative expenses $950,000...
Can someone please explain the edgeworth box to me by typing in a way i can...
Can someone please explain the edgeworth box to me by typing in a way i can see and understand? what determines the contract curves path?
Hello can someone please explain the is lm curves step by step for me?
Hello can someone please explain the is lm curves step by step for me?
Can someone please explain to me why a decrease in bad debt expense is a concern...
Can someone please explain to me why a decrease in bad debt expense is a concern or if an increase in debt expense is a concern as well. For example if in the previous year the company had 162,344 but now the current year it has 148,252. What is the inherent risk here with this?
Can someone please walk through this program for me and explain out the outputs are generated....
Can someone please walk through this program for me and explain out the outputs are generated. #include <iostream> #include <iomanip> using namespace std; const int size = 5; int fun(int arz[size], int jump) { int i, j = 0; for(i = 0; i < size; i += jump) j += arz[i]; return j; } main() { int arx[size] = {1, 2, 4, 8, 16}; int ary[size] = {10, 20, 40, 80, 160}; cout << fun(arx, 1) << endl; cout <<...
Can someone please explain the following program to me? I have ran it, but do not...
Can someone please explain the following program to me? I have ran it, but do not understand how the answers are being derived. #include<iostream> using namespace std; int num1 = 1; int quiz(int num) { static int n1 = 10; int n2 = 20; n1--; n2++; num1++; if (num == 1) return num1; else if (num < 3) return n1; else return n2; } // quiz main() { cout << quiz(num1) << endl; cout << quiz(num1) << endl; cout <<...
Can someone show me the steps of how to solve this? A program needs to access...
Can someone show me the steps of how to solve this? A program needs to access the following pages: 1, 2, 3, 4, 2, 1, 3, 2, 1, 4, 2, 3 There are 3 initially empty frames, how many page faults will there be respectively, if we use First-in-First-out, and Farthest-in-Future page replacement algorithms? A) 7 and 7 B) 7 and 6 --  Correct Answer   C) 6 and 6 D) 6 and 5
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT