Lino
Lino

Reputation: 45

What does the IEEE 754 single precision representation of the number 0 look like?

I tried to type this into all online converters, but the answer 0 00000000 00000000000000000000000 is not helpful.

I tried the String 0 01111111 00000000000000000000000 as an answer, the exponent (with bias) in denary is 0. And my final equation is 0.0 * 2^0

Upvotes: 1

Views: 585

Answers (1)

Eric Postpischil
Eric Postpischil

Reputation: 223101

“0 00000000 00000000000000000000000” is the answer. The IEEE-754 binary32 representation of zero has all bits zero.

IEEE-754 does distinguish a +0 and a −0. The above is +0. For −0, flip the first bit, “1 00000000 00000000000000000000000”.

Upvotes: 1

Related Questions