1
votes

Assume the following representation for a floating point number:

1 sign bit
4 bits exponent
4 bits significand
Bias of 7 for the exponent (there is no implied 1 as in IEEE)



Given this information, how would I find the largest and smallest positive floating point numbers (in binary) that this system can support ?

I want the solution but i'm interested in the method. How do I use this information to get my result ?

1
There's not enough information here. Does this imaginary format support infinities, nans, zeros? gradual underflow? How are the significand bits interpreted: does the most significant significand bit have value 1 or value 0.5? (For IEEE 754, that's known, but this isn't IEEE 754.) Some examples of bit strings and their corresponding values might help here. - Mark Dickinson

1 Answers

2
votes

the value is calculated by mantissa * base ^ (exponent - bias)

The highest values will have all bits true somantissa = exponent = 2^4 -1 = 15

put that all together and we get the maximum:

15 * 2 ^ (15 - 7) = 
15 * 2 ^ 8 = 
15 * 256 = 
3840

the smallest would be where mantissa = 0001 and exponent = 0000 so:

1 * 2 ^ (0 - 7) = 
2 ^ -7 = 
0.0078125