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
Click For Summary
SUMMARY

The smallest and largest numbers in an 8-bit floating point system, consisting of 1 sign bit, a 3-bit biased exponent, and a 4-bit normalized mantissa, can be calculated by considering the bias and the structure of the representation. The biased exponent ranges from -4 to +3, and the normalized mantissa includes a leading 1. The representation for the number 4.5 is calculated as 0 110 1001, where the sign bit is 0, the biased exponent is 110, and the mantissa is 1001. The discussion highlights the importance of understanding normalization and bias in floating point representation.

PREREQUISITES
  • Understanding of floating point representation
  • Knowledge of biased exponent calculations
  • Familiarity with binary number systems
  • Concept of normalized mantissa in floating point formats
NEXT STEPS
  • Research IEEE 754 floating point representation standards
  • Learn about biased exponent calculations in floating point systems
  • Explore the implications of normalization in floating point arithmetic
  • Study the differences between 8-bit, 32-bit, and 64-bit floating point representations
USEFUL FOR

Computer science students, software developers, and anyone involved in numerical computing or floating point arithmetic will benefit from this discussion.

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   Reactions: 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   Reactions: 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   Reactions: pbuk
  • #10
Yes, that is another possible interpretation.
 

Similar threads

  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
10
Views
4K
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K