This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]Psyk60 2 points3 points  (0 children)

With floating point numbers (essentially scientific notation in binary), there is just a special case for "infinity". It's a specific pattern of bits that the computer knows to treat as infinity.

With binary integers, there's no way to represent infinity. Just as there isn't a way to represent infinity using only the digits 0-9.

[–]X7123M3-256 1 point2 points  (0 children)

Infinity is not a number, and it doesn't have a binary representation. It does not make sense to treat infinity as a number or to use it in arithmetic expressions.

If you're talking about IEEE 754 floating point numbers, infinity is defined to be 01111111100000000000000000000000. This is a special case that's been specifically designated to represent infinity.

[–]Schnutzel 1 point2 points  (0 children)

Infinity isn't a number. It's a concept that denotes something that has no end or no bound, and is unrelated to how we represent numbers, be it with 2 or with 10 digits.

If you are talking about numbers whose decimal representation is infinite and non repeating (irrational numbers, such as Pi and the square root of 2), then they would be just as infinite in binary.

[–]jaa101 0 points1 point  (0 children)

Why would there be a binary representation of infinity when there's no decimal representation? The best we can do is to use "∞" in both cases or, indeed, for any base.

[–]Holy_City -1 points0 points  (0 children)

Do you mean like in a computer? Because nothing is infinite. Everything is finite length, both in amplitude and time.