- #1
hastings
- 80
- 0
Consider a floating point binary notation with 16 bits. From left to right, it consists of 1bit for the sign (0= "+"), e bits for the exponent represented in Excess[tex]~2^{e-1}[/tex] and the remaining bits for the decimal part of the mantissa, normalized between 1 and 2 ([tex]1 \leq m <2[/tex]).
a) Calculate the minimum value [tex]e_{min}[/tex] of the exponent that allows us to write in the above notation, both the numbers r= -8147.31 and
s= [tex]0.103 \cdot 10^{-6} [/tex];
This is what I would do.
1. Calculate the order of magnitude of both r and s
2. Write a proportion knowing that [tex]2^{10} \approx 10^3[/tex] (like say 10:3= x: 4, considering 4 the result of point 1. ).
3. Find x from the above proportion and find the highest power of 2 which includes x (like say x=15, [tex] 2^3 \leq 15 \leq 2^4[/tex], I'd take [tex]2^4[/tex])
4. Calculate [tex]e_{min}[/tex]: since it's in excess [tex]2^{e-1}[/tex], I solve the equation [tex]2^4=2^{e-1} \Rightarrow e=e_{min}=4+1=5[/tex], where [tex]2^4[/tex] is the result of point 3.
Is this resoning right?
Now, when I went to calculate the order of magnitude of r and s, I got that
Ord of Magn r=[tex]10^4[/tex], better say 4.
Ord of Magn s=[tex] 10^{-5}[/tex] better say -5.
Which should I consider as a starting point, [tex] 10^4 \mbox{ or } 10^{5} [/tex] ?
a) Calculate the minimum value [tex]e_{min}[/tex] of the exponent that allows us to write in the above notation, both the numbers r= -8147.31 and
s= [tex]0.103 \cdot 10^{-6} [/tex];
This is what I would do.
1. Calculate the order of magnitude of both r and s
2. Write a proportion knowing that [tex]2^{10} \approx 10^3[/tex] (like say 10:3= x: 4, considering 4 the result of point 1. ).
3. Find x from the above proportion and find the highest power of 2 which includes x (like say x=15, [tex] 2^3 \leq 15 \leq 2^4[/tex], I'd take [tex]2^4[/tex])
4. Calculate [tex]e_{min}[/tex]: since it's in excess [tex]2^{e-1}[/tex], I solve the equation [tex]2^4=2^{e-1} \Rightarrow e=e_{min}=4+1=5[/tex], where [tex]2^4[/tex] is the result of point 3.
Is this resoning right?
Now, when I went to calculate the order of magnitude of r and s, I got that
Ord of Magn r=[tex]10^4[/tex], better say 4.
Ord of Magn s=[tex] 10^{-5}[/tex] better say -5.
Which should I consider as a starting point, [tex] 10^4 \mbox{ or } 10^{5} [/tex] ?
Last edited: