Decimal64 floating-point format: Difference between revisions

Content deleted Content added
Line 56:
This includes [[subnormal numbers]] where the leading significand digit is 0.
 
If the 4 bits after the sign bit are "1100", "1101", or "1110", then the 10-bit exponent field is shifted 2 bits to the right (after both the sign bit and the "11" bits thereafter), and the represented significand is in the remaining 51 bits. In this case there is an implicit (that is, not stored) leading 3-bit sequence "100" for the most bits of the true significand (in the remaining lower bits ''tttxttt...ttt'' of the significand, not all possible values are used).
 
s 11 00eeeeeeee [(100)tttxtt][tttttttt][tttttttt][tttttttt][tttttttt][tttttttt][tttttttt]
s 11 01eeeeeeee [(100)tttxtt][tttttttt][tttttttt][tttttttt][tttttttt][tttttttt][tttttttt]
s 11 10eeeeeeee [(100)tttxtt][tttttttt][tttttttt][tttttttt][tttttttt][tttttttt][tttttttt]
 
The 2-bit sequence "11" after the sign bit indicates that there is an ''implicit'' 3-bit prefix "100" to the significand. Compare having an implicit 1-bit prefix "1" in the significand of normal values for the binary formats. Note also that the 2-bit sequences "00", "01", or "10" after the sgn bit are part of the exponent field.
 
Note that the leading bits of the significand field do ''not'' encode the most significant decimal digit; they are simply part of a larger pure-binary number. For example, a significand of {{gaps|8|000|000|000|000|000}} is encoded as binary {{gaps|0111|0001101011|1111010100|1001100011|0100000000|0000000000}}<sub>2</sub>, with the leading 4 bits encoding 7; the first significand which requires a 54th bit is 2<sup>53</sup> = {{gaps|9|007|199|254|740|992}}. The highest valid significant is {{gaps|9|999|999|999|999|999}} whose binary encoding is
{{gaps|(100)011|10000110|11110010|01101111|11000000|11111111|11111111}}<sub>2</sub> (with the 3 most significant bits (100) not stored but implicit as shown above; and the next bit ''x'' is always zero in valid encodings).
 
In the above cases, the value represented is