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

Discussion Overview

The discussion revolves around determining the smallest and largest numbers representable in an 8-bit floating point system, which consists of one sign bit, a 3-bit biased exponent, and a 4-bit normalized mantissa. Participants explore various interpretations of the problem, including considerations of negative numbers and the implications of normalization.

Discussion Character

  • Homework-related
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant suggests that the smallest number could be represented as all zeros and questions if the largest number is represented by all ones.
  • Another participant raises a philosophical question about whether 1 is smaller than -1, indicating a potential ambiguity in the problem's wording regarding negative numbers.
  • A participant asserts that the question likely seeks the smallest non-zero magnitude, implying a need for clarification on what "largest" and "smallest" mean in this context.
  • Several participants emphasize the importance of considering the biased exponent and how it affects the representation of numbers, with one providing a detailed calculation for the representation of 4.5.
  • There is a discussion about the normalization of the mantissa and whether it implies the inclusion of a leading 1, with differing interpretations of the problem statement regarding subnormal numbers.
  • One participant notes that the problem lacks sufficient information to provide a definitive answer and references external resources for further clarification.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the interpretations of the problem, particularly regarding the treatment of negative numbers, the implications of normalization, and the existence of subnormal numbers. Multiple competing views remain on how to approach the question.

Contextual Notes

There are limitations in the problem statement, including the lack of clarity on the bias of the exponent and whether subnormal numbers are considered. The interpretations of normalization and the leading 1 in the mantissa also vary among participants.

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