in the floating point number system f=[a=2,k−=−4,k+=4,t=6] the normalized, regularly rounded representation of 0.435 is: in matlab

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:

  1. Convert the integer part of the significand, 4, into binary: 100.

  2. Convert the fractional part of the significand, 0.35, into binary. We can use the following algorithm:

  • Multiply the fractional part by 2.
  • If the integer part of the result is 1, append 1 to the binary representation and subtract 1 from the result; otherwise, append 0 to the binary representation.
  • Repeat the previous step until the fractional part becomes 0 or the desired number of bits is obtained.

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:

  • 100.010 = 4.25 x 2^-1 (difference = 0.185)
  • 100.011 = 4.28125 x 2^-1 (difference = 0.15425)

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