How do computers store and interpret floating point numbers in binary?

Asked

Viewed 110 times

4

In my course of systems analysis and development I started the matter of computational mathematics the subject was numerical bases and conversions, something that caught my attention is that they were also representing binary numbers with comma as for example: 1010,01 and also converting it to decimal numbers for our numerical system, but I’ve never seen any binary floating point numbers anywhere, and in Windows calculator in comma programmer mode it’s not even enabled for binary numbers.

1 answer

6


It doesn’t really exist and it doesn’t make much sense. What one does is separate the whole and decimal parts with a comma, but in the computer this is not how these numbers are represented. Binary notation was created to indicate how the layout physical data in the computer, so how does each bit in memory represent a number.

The floating point has no whole part and decimal part, it is a number that has a sign, a mantissa and an exponent, but as a single thing, so:

Representação de um double

For the computer that’s what matters and it’s efficient that way. There is no separation, when you see on the screen you are just receiving a textual representation of something that is shown decimally and there yes has a comma to give indication of greatness.

I know there are some people who invented this nonsense of representing a number as binary without being binary, but that doesn’t make sense and so real things (Windows calculator) will not give credit to this.

Even other forms of representing integer and decimal part do not use comma as internal representation, the comma is a human concept for decimal numbers.

If you want more details has an answer here. Or can see on Wikipedia.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.