Floating point numbers - the nearest number is up to 1.7

I am preparing for some exams, and one of the questions asked in the past is to find the closest number to 1.7, given the imaginary floating point format, which has a total of 8 bits (1 for sign, 3 for exponent, 4 for significance).

In any case, I filed 1.1011, since I can play with four significant digits, and 1 - with the IEEE standard. However, setting the indicator to 000 will make it a denormalized number. Does this mean that the value 1.7 will be equal to 1.1100 in a floating point?

THX

+5
source share
2 answers

, . , .

, IEEE-754 "" ( " n" ) . 3 3, :

encoding    meaning
  000       exponent for zeros and denormals
  001       2^-2
  010       2^-1
  011       2^0
  100       2^1
  101       2^2
  110       2^3
  111       exponent for infinities and NaNs

, 1.7 3 (b011) b1011, , b00111011.

+3

, , - , 3, , 3 2 ^ 0

+2

All Articles