The exponent is signed, so with 2 bits you get exponents ranging from -2 to 1. The mantissa can represent 0-7, so together you get max = 7*2^1 = 14
Tal Pressman
2009-04-23 07:19:52
The exponent is signed, so with 2 bits you get exponents ranging from -2 to 1. The mantissa can represent 0-7, so together you get max = 7*2^1 = 14
Quoting from a mythical IEEE754 site:
The IEEE very small precision floating point standard representation requires a 6 bit word, which may be represented as numbered from 0 to 5, left to right. The first bit is the sign bit, S, the next three bits are the exponent bits, 'E', and the final two bits are the fraction 'F':
S EEE FF
0 1 3 45
The value V represented by the word may be determined as follows:
* If E=7 and F is nonzero, then V=NaN ("Not a number")
* If E=7 and F is zero and S is 1, then V=-Infinity
* If E=7 and F is zero and S is 0, then V=Infinity
* If 0<E<7 then V=(-1)^S * 2^(E-3) * (1.F) where "1.F"
is intended to represent the binary number created by
prefixing F with an implicit leading 1 and a binary point.
* If E=0 and F is nonzero, then V=(-1)^S * 2^(-2) * (0.F)
These are "unnormalized" values.
* If E=0 and F is zero and S is 1, then V=-0
* If E=0 and F is zero and S is 0, then V=0
So you see that the maximum number you can have is the bit pattern "0 110 11"
:
v = -1^0 * 2^(6-3) * (1 + 1/2 + 1/4)
= 1 * 8 * 1.75
= 14
This description is actually paraphrased from here but adjusted for the different field sizes.