I will post another link for another 1500 points since I can only give a max of
ID: 643669 • Letter: I
Question
I will post another link for another 1500 points since I can only give a max of 1500 per question. I will do this if someone answers this question and I will then post the second link into the comments.
I already have the answer to this problem, but I need someone to SHOW ME THE WORK on how to get the answers.
If you want to look at the answer go to problem 2.86 in this link: http://web.cse.ohio-state.edu/~reeves/CSE2421au12/HW2AU12Key.pdf
How do you get the answer?
As an example. to represent the number 7/8, we would have s = 0, M = 7/4, and E = -1. Our number would therefore have an exponent field of 0x3E (decimal value 63 - 1 = 62) and a significand field 0xC0 (binary 1100002), giving a hex representation 3ECO. You need not fill in entries marked . 2.86 Consider a 16-bit floating-point representation based on the IEEE floating-point format, with one sign bit, seven exponent bits (k = 7), and eight fraction bits (n = 8). The exponent bias is 2^7-1 - 1 = 63. Fill in the table that follows for each of the numbers given, with the following instructions for each column: Hex: The four hexadecimal digits describing the encoded form. M: The value of the signifcand. This should be a number of the form x or , where x is an integer, and y is an integral power of 2. Examples include: O. , and E: The integer value of the exponent. V: The numeric value represented. Use the notation x or x x 2, where x and z are integers.Explanation / Answer
Consider the 0.875=7/8, and multiply with 2.
If any value obtained after the decimal point it is considered to the binary equivalent value.
Steps to obtain thebinary value of the floating point is as follow:
0.875 *2 = 1.75 ------------ 1
------------------------
0.75 *2 = 1.5 ------------- 1
------------------------
0.5 *2 = 1.0 ------------ 1
Since the value after the decimal is zero, no more values will be obtained. Therefore, the binary equivalent value of the floating point is 1112.
Now, move one position values towards left. Therefore, the value obtained will be 1.11 x 2-1
The normalize form of 0.111 is 1.112 x 2-1.
The Mantissa form of 0.11 from the obtained value is 11000002.
Since, the exponent value in binary format is 8 bits, so add zeros towards the right hand side as shown above.
Now, to obtain the exponent value of binary format, add the -1 of exponent value to 63 that is
-1+63=62.
The binary equivalent of 62 is 1111102.
Since, it is only in 7-bits add a zero towards the left hand side.
So, the exponent value is 011111102.
The sign bit is set to 0 because the decimal value is a negative.
Therefore, the 16-bit single precision value is,
0 01111110 1100000
The representation of a floating point is,
Where s is the sign bit
M is the fraction part of a binary number
x is the exponent function to the power of 2. That is number of bits moved towards the left to obtain an exponent value.
Whereas,
s takes only 1 bit that represents either the decimal number is positive or negative.
E is the k bits that are depending on the precision, the k-bits vary.
E=(x-63)
M is the mantissa with n-bits this again depends on the floating point format.
Here in the above table it is considered to be the 16-bit floating point.
To represent a value -0, the Mantissa position value is 0
Since it has been given -0 that mean the value is a negative so
the sign bit is set to 1, there is not exponent value and the mantissa value therefore the first row is written as,
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Here convert the above into hexa decimal value,
Hexa=8000.
Mantissa=0
Exponent is -62.
Value =-0
Second row, smallest value > 2
According to above 16-bit format conversion if observed the smallest value greater than 2 is obtained as, lets consider a value whose mantissa is 1 and let the exponent is set to highest value.
If it is converted, that mantissa highest value is 256 since it contains 8-bits. Thus, decimal fraction value of the least is set to 1.
The exponent’s highest value is 64, set the highest bit to 1.
That means among the bits, the Mantissa is made to rise by to obtain a value 1. In order to get the value 1, in mantissa, the value which satisfies is M= 257/256. =1
The Exponent value is E=1.
Therefore, the final value is 257/128.=2.007812 which is the smallest value and greater than 2.
Consider the Hexa value:
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
Now, convert the above binary into its equivalent hexa code as,
4001. Thus, Hexa=4001.
Third row,
To obtain the value of 512, there is no Mantissa value thus to obtain the value of 512 it requires 0000001000000000
The Exponent is considering as 72.
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
Convert the above code, to hexa form as
4800
the row to represent the 3BB0 is just convert it into the binary code, you will obtain as among the 16 bits how many bits are required to represent the Mantissa and exponent values will be obtained. Depending on those values, the Mantissa and Value and the Exponent are considered.
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0