In order to represent the number 0.435 using the given floating-point system f=[a=2,k−=−4,k+=4,t=6], we need to first convert it into scientific notation format with the exponent within the range of k− and k+.
That is,
0.435 = 4.35 x 10^-1
The value of the exponent, -1, is already within the range of k− and k+, so we don't need to adjust it.
Next, we need to obtain the binary representation of the significand, 4.35. We can use the following steps:
Convert the integer part of the significand, 4, into binary: 100.
Convert the fractional part of the significand, 0.35, into binary. We can use the following algorithm:
Using this algorithm, we obtain:
0.35 x 2 = 0.7, integer part is 0, binary representation is 0. 0.7 x 2 = 1.4, integer part is 1, binary representation is 01. 0.4 x 2 = 0.8, integer part is 0, binary representation is 010. 0.8 x 2 = 1.6, integer part is 1, binary representation is 0101. 0.6 x 2 = 1.2, integer part is 1, binary representation is 01011. 0.2 x 2 = 0.4, integer part is 0, binary representation is 010110.
So the binary representation of the significand is 100.010110.
Now, we need to round the significand to the nearest representable value in the given floating-point system, using the following tie-breaking rule: if the two nearest values differ only in their least significant bit, choose the one with the least significant bit equal to 0.
The value of t, 6, indicates that we have 6 bits for the significand, including the hidden bit (a=2). Therefore, we need to round the binary representation of the significand to 5 bits (we discard the last bit).
The potential nearest values are:
The two nearest values differ in their least significant bit, so we choose the one with the last bit equal to 0:
100.010 is the rounded binary representation of the significand.
Finally, we can assemble the normalized, regularly rounded representation of 0.435, using the following format:
(-1)^0 x 2^(exponent) x significand
where exponent is the binary representation of the biased exponent, obtained by adding 2^3-1 = 7 to the unbiased exponent (-1), and significand is the rounded binary representation with the hidden bit appended.
Therefore:
exponent = 3 + 2^3-1 = 10 (binary: 1010) significand = 1.00010
The final result is:
(-1)^0 x 2^(10-2) x 1.00010 = 1.011010 x 2^8
Therefore, the normalized, regularly rounded representation of 0.435 in the given floating-point system is:
f=[a=2,k−=−4,k+=4,t=6] 1.011010 x 2^8
gistlibby LogSnag