<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sarg.dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=2A02%3AA313%3A2B7%3A2B80%3A351E%3A33C5%3A61F7%3A2582</id>
	<title>Vero - Wikipedia - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sarg.dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=2A02%3AA313%3A2B7%3A2B80%3A351E%3A33C5%3A61F7%3A2582"/>
	<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php/Special:Contributions/2A02:A313:2B7:2B80:351E:33C5:61F7:2582"/>
	<updated>2026-08-14T19:46:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.sarg.dev/index.php?title=Exponent_bias&amp;diff=625685</id>
		<title>Exponent bias</title>
		<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Exponent_bias&amp;diff=625685"/>
		<updated>2025-04-16T22:06:00Z</updated>

		<summary type="html">&lt;p&gt;2A02:A313:2B7:2B80:351E:33C5:61F7:2582: 524387 corrected to 524287&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Short description|Offset of the exponent field of floating-point numbers}}&lt;br /&gt;
{{Use dmy dates|date=May 2019|cs1-dates=y}}&lt;br /&gt;
In [[IEEE 754]] [[Floating-point arithmetic|floating-point]] numbers, the [[exponent]] is biased in the [[biasing|engineering sense of the word]] – the value stored is offset from the actual value by the &#039;&#039;&#039;exponent bias&#039;&#039;&#039;, also called a &#039;&#039;&#039;biased exponent&#039;&#039;&#039;.&amp;lt;ref name=&amp;quot;Gosling_1980&amp;quot;/&amp;gt;&lt;br /&gt;
Biasing is done because exponents have to be signed values in order to be able to represent both tiny and huge values, but [[two&#039;s complement]], the usual representation for signed values, would make comparison harder.&lt;br /&gt;
&lt;br /&gt;
To solve this problem the exponent is stored as an unsigned value which is suitable for comparison, and when being interpreted it is converted into an exponent within a signed range by subtracting the bias.&lt;br /&gt;
&lt;br /&gt;
By arranging the fields such that the sign bit takes the most significant bit position, the biased exponent takes the middle position, then the [[significand]] will be the least significant bits  and the resulting value will be ordered properly. This is the case whether or not it is interpreted as a floating-point or integer value. The purpose of this is to enable high speed comparisons between floating-point numbers using fixed-point hardware.&lt;br /&gt;
&lt;br /&gt;
If there are &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; bits in the exponent, the bias&lt;br /&gt;
is typically set as &amp;lt;math&amp;gt;b = 2^{E-1}-1&amp;lt;/math&amp;gt;.&amp;lt;ref name=&amp;quot;Bryant_2010&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, the possible integer values that the biased exponent can express lie in the range &amp;lt;math&amp;gt;[1-b, b]&amp;lt;/math&amp;gt;.&lt;br /&gt;
To understand this range, with &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; bits in the exponent, the possible unsigned integers lie in the range &amp;lt;math&amp;gt;[0, 2^{E}-1]&amp;lt;/math&amp;gt;.&lt;br /&gt;
However, the strings containing all zeros and all ones are reserved for special values, so the expressible integers lie in the range &amp;lt;math&amp;gt;[1, 2^{E}-2]&amp;lt;/math&amp;gt;.&lt;br /&gt;
It follows that:&lt;br /&gt;
&lt;br /&gt;
* The maximum biased value is &amp;lt;math&amp;gt;(2^{E}-2) - b = 2b - b = b&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The minimum biased value is &amp;lt;math&amp;gt;1 - b&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When interpreting the floating-point number, the bias is subtracted to retrieve the actual exponent.&lt;br /&gt;
&lt;br /&gt;
* For a [[Half-precision_floating-point_format|half-precision]] number, the exponent is stored in the range {{math|[1, 30]}} (0 and 31 have special meanings), and is interpreted by subtracting the bias for a 5-bit exponent (15) to get an exponent value in the range {{math|[−14, 15]}}.&lt;br /&gt;
* For a [[Single-precision floating-point format|single-precision]] number, the exponent is stored in the range {{math|[1, 254]}} (0 and 255 have special meanings), and is interpreted by subtracting the bias for an 8-bit exponent (127) to get an exponent value in the range {{math|[−126, 127]}}.&lt;br /&gt;
* For a [[Double-precision_floating-point_format|double-precision]] number, the exponent is stored in the range {{math|[1, 2046]}} (0 and 2047 have special meanings), and is interpreted by subtracting the bias for an 11-bit exponent (1023) to get an exponent value in the range {{math|[−1022, 1023]}}.&lt;br /&gt;
* For a [[Quadruple-precision_floating-point_format|quadruple-precision]] number, the exponent is stored in the range {{math|[1, 32766]}} (0 and 32767 have special meanings), and is interpreted by subtracting the bias for a 15-bit exponent (16383) to get an exponent value in the range {{math|[−16382, 16383]}}.&lt;br /&gt;
* For an [[Octuple-precision floating-point format|octuple-precision]] number, the exponent is stored in the range {{math|[1, 524286]}} (0 and 524287 have special meanings), and is interpreted by subtracting the bias for a 19-bit exponent (262143) to get an exponent value in the range {{math|[−262142, 262143]}}.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
The floating-point format of the [[IBM 704]] introduced the use of a biased exponent in 1954.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Offset binary]] (also referred to as excess-K)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist|refs=&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Gosling_1980&amp;quot;&amp;gt;{{cite book |title=Design of Arithmetic Units for Digital Computers |author-first=John B. |author-last=Gosling |editor-first=Frank H. |editor-last=Sumner |date=1980 |edition=1 |publisher=[[The Macmillan Press Ltd]] |location=Department of Computer Science, [[University of Manchester]], Manchester, UK |isbn=0-333-26397-9 |chapter=6.1 Floating-Point Notation / 6.8.5 Exponent Representation |series=Macmillan Computer Science Series |pages=74, 91, 137 |quote=[…] In [[floating-point representation]], a number &#039;&#039;x&#039;&#039; is represented by two signed numbers &#039;&#039;m&#039;&#039; and &#039;&#039;e&#039;&#039; such that &#039;&#039;x&#039;&#039;&amp;amp;nbsp;= &#039;&#039;m&#039;&#039; &amp;amp;middot; &#039;&#039;b&#039;&#039;&amp;lt;sup&amp;gt;&#039;&#039;e&#039;&#039;&amp;lt;/sup&amp;gt; where &#039;&#039;m&#039;&#039; is the [[significand|mantissa]], &#039;&#039;e&#039;&#039; the [[exponent]] and &#039;&#039;b&#039;&#039; the [[base (exponentiation)|base]]. […] The mantissa is sometimes termed the characteristic and a version of the exponent also has this title from some authors. It is hoped that the terms here will be unambiguous. […] [w]e use a[n exponent] value which is shifted by half the binary range of the number. […] This special form is sometimes referred to as a biased exponent, since it is the conventional value plus a constant. Some authors have called it a characteristic, but this term should not be used, since [[Control Data Corporation|CDC]] and others use this term for the mantissa. It is also referred to as an &#039;[[excess-K|excess -]]&#039; representation, where, for example, - is 64 for a 7-bit exponent (2&amp;lt;sup&amp;gt;7&amp;amp;minus;1&amp;lt;/sup&amp;gt;&amp;amp;nbsp;= 64). […]}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Bryant_2010&amp;quot;&amp;gt;{{cite book |title=Computer systems: a programmer&#039;s perspective |author-last1=O&#039;Hallaron |author-first1=David R. |author-first2=Randal E. |author-last2=Bryant |author-link2=Randal E. Bryant |date=2010 |publisher=[[Prentice Hall]] |location=Boston, Massachusetts, USA |isbn=978-0-13-610804-7 |edition=2}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Exponent Bias}}&lt;br /&gt;
[[Category:Computer arithmetic]]&lt;/div&gt;</summary>
		<author><name>2A02:A313:2B7:2B80:351E:33C5:61F7:2582</name></author>
	</entry>
</feed>