Mark has corrected me that division by zero results in positive or negative infinity in IEEE 754-2208.
In the wikipedia article on the subject, we find the following:
sign = 0 for positive infinity, 1 for negative infinity.
biased exponent = all 1 bits.
fraction = all 0 bits.
Source: IEEE 754 Wikipedia article
I was wrong in thinking it would result in a NaN, upon which I elaborated below.
+Infinity:
0 11111111 00000000000000000000000
-Infinity:
1 11111111 00000000000000000000000
INCORRECT ORIGINAL RESPONSE BELOW
May still be of tangential interest, so leaving it in.
This results in, from my understanding, a NaN
, pr **not a number*.
The wikipedia page on Nan has an encoding section from which the following quote arrives.
In IEEE 754 standard-conforming floating-point storage formats, NaNs are identified by specific, pre-defined bit patterns unique to NaNs. The sign bit does not matter. Binary format NaNs are represented with the exponential field filled with ones (like infinity values), and some non-zero number in the significand (to make them distinct from infinity values). The original IEEE 754 standard from 1985 (IEEE 754-1985) only described binary floating-point formats, and did not specify how the signaled/quiet state was to be tagged. In practice, the most significant bit of the significand determined whether a NaN is signalling or quiet. Two different implementations, with reversed meanings, resulted.
Source: NaN Encoding (Wikipedia)
The article also goes on to note that in 2008, the IEEE 754-2008 revision adds a suggested method for indicating if the NaN should be quiet or verbose.
NaN is identified by having the top five bits of the combination field after the sign bit set to ones. The sixth bit of the field is the 'is_quiet' flag. The standard follows the interpretation as an 'is_signaling' flag. I.e. the signaled/quiet bit is zero if the NaN is quiet, and non-zero if the N is identified by having the aN is signaling.
Basically, as before, the exponent is all ones, and the last bit indicates whether it is quiet or not.
My interpretation is that a NaN could be represented in a number of ways, including as follows:
0 11111111 00000000000000000000010