What Are the Smallest and Largest Numbers in an 8-bit Floating Point System?

  • Thread starter Thread starter ver_mathstats
  • Start date Start date
  • Tags Tags
    Representation
AI Thread Summary
In an 8-bit floating point system with one sign bit, a 3-bit biased exponent, and a 4-bit normalized mantissa, the smallest non-zero number is determined by the smallest exponent and mantissa values. The exponent is biased, likely ranging from -4 to +3, which affects the representation of numbers. The largest number is represented by the maximum values in the exponent and mantissa fields, while the smallest non-zero number requires careful consideration of the normalized form. The discussion highlights the importance of understanding the bias and normalization in floating point representation. Overall, the problem lacks sufficient information to definitively determine the smallest and largest numbers without assumptions.
ver_mathstats
Messages
258
Reaction score
21
Homework Statement:: We have an 8-bit floating point representation, one bit for the sign, 3-bit biased exponent, and 4-bit for the normalized mantissa. What is the smallest and largest number you can represent?
Relevant Equations:: -

Would the smallest number just be
00000000
and then I would just convert this into decimal?

And then would the largest number just be
01111111
and then I would also just convert this into decimal?

Or am I on the wrong track?

Thanks.
 
Physics news on Phys.org
Hmm. Is 1 "smaller" than -1? Does the question as worded seem to require the exclusion of negative numbers?
 
Oops, this one DOES belong in computing!
 
  • Skeptical
Likes berkeman
For the answer not to be trivial I would assume that it is asking for the number with the smallest non-zero magnitude.
 
Yes.
 
ver_mathstats said:
am I on the wrong track?
Yes, you are. You need to think about what "largest" and "smallest" (assuming that this really means absolute value, i.e., ignoring the sign bit) translate to in terms of mantissa and exponent.
 
PeterDonis said:
Yes, you are. You need to think about what "largest" and "smallest" (assuming that this really means absolute value, i.e., ignoring the sign bit) translate to in terms of mantissa and exponent.
To the OP, you also need to consider the fact that the exponent is biased. Post #1 doesn't state what the bias is, but since there are only 3 bits used, I'm assuming that the possible exponent values are in the range of -4 through +3. IOW, to get the three-bit exponent field, you need to add 4 to the actual exponent.

Based on my assumption, here are the calculations for the representation of 4.5:
##4.5 = 100.1_2 = 1.001_2 \times 2^2## (normalized form, similar to scientific notation, but in binary)
Actual exponent = 2
Biased exponent = Actual exponent + 4 = 6 = ##110_2##
Sign = 0 (positive number)
Exponent field = 110
Mantissa = 1001

Representation for 4.5: 0 110 1001 (spaces included only to separate sign bit field, exponent field, and mantissa)

As a side note, the 32-bit and 64-bit floating point representations (as mandated by IEE 754) have an "invisible bit" of 1 that results from assuming that the normalized form always looks like ##1.xxx\dots_2##, so including a bit for the leading 1 digit isn't necessary. Since this optimization wasn't mentioned in the problem statement, I haven't included it in my calculation above.
 
  • Informative
Likes berkeman
Mark44 said:
As a side note, the 32-bit and 64-bit floating point representations (as mandated by IEE 754) have an "invisible bit" of 1 that results from assuming that the normalized form always looks like ##1.xxx\dots_2##, so including a bit for the leading 1 digit isn't necessary. Since this optimization wasn't mentioned in the problem statement, I haven't included it in my calculation above.
The problem statement did say that the mantissa is normalized, and I would assume that means insertion of a leading 1. However the problem statement does not say what happens when the exponent is the minimum (i.e. most negative) i.e. whether subnormals exist.

In other words @ver_mathstats there is not enough information here to properly answer the question, however the Wikipedia article https://en.wikipedia.org/wiki/IEEE_754 covers all of this quite well.
 
pbuk said:
The problem statement did say that the mantissa is normalized, and I would assume that means insertion of a leading 1.
I interpreted "normalized" to mean that numbers would be in the form +/- ##1.xxx_2 \times 2^N##, where N is the biased 3-bit exponent. I didn't take this to mean that the leftmost 1 was implied, as is the case in the IEEE 754 standard.
 
  • Like
Likes pbuk
  • #10
Yes, that is another possible interpretation.
 

Similar threads

Replies
17
Views
3K
Replies
2
Views
2K
Replies
2
Views
2K
Replies
5
Views
6K
Replies
6
Views
3K
Replies
8
Views
2K
Back
Top