Exit Full View

Long Numbers

You may be familiar with numbers that have "recurring digits" after the decimal point.

For example,

0.11111111111111...

This is normally denoted with a dot above the 1.

  .
0.1

But what is it's value? It's one ninth. We can do high-school maths to show this. Just do the long division of 1 / 9.

Now lets multiply by 9 using high-school maths again, and we get :

0.999999999999...

or

  .
0.9

Does this mean we have two ways to write 1? Yes. 0.99999... = 1 That shouldn't be too surprising, we could also write it as 1.00000000000...

So far so ordinary. But lets do the same trick to the LEFT of the decimal point instead of the right.

What is this number?

...00000000000000

I hope you agree it is zero.

How about this?

{
...99999999999999.0

That's a BIG number, isn't it. Unimaginably big.

No.

Let's add 1 to it, using high school maths. Doing each column in turn from the right...

...99999999999999 +
                1
-----------------

-----------------

9+1 = 10, so that's a 0, carry 1. 1 (the carry) + 9 = 10, so that's a 0, carry 1

We always carry 1, and every digit of the result is 0.

...99999999999999 +
                1
-----------------
...00000000000000
-----------------
...1111111111111   // The "carry"

We've already said that :

...0000000000000 = 0

So

...9999999999999 + 1 = 0

And doing a little rearranging :

...9999999999999 = -1

Not so big after all!

The common rebuttal : What about the 1 at the very left of all those zeros?

There isn't one. That's the nature of infinity, you never get there. first digit on the right is 0, the 2nd is zero, the 3rd is zero... forever.

If you are willing to throw away your dogma, and accept the weirdness, we can go further.

What is :

...9999 / 3

High school maths tells us it is :

...3333

So

...3 = -1 / 3

Yep, minus one third.

Clearly ...3 is an integer, because there are no decimal places. But we've just shown it is -1/3

If you think this is just a joke, think again. Top-tier mathematicians use these numbers.

Why not play around with them, to see what other numbers you can discover. How about -10? Hint high school maths tells us if we start with 1, and shift the digits left by 1 column, we will get 10.

As an aside, computers use them all the time (sort of). Numbers are stored in binary (not base 10 like us silly humans). So 1 is stored as :

1

2 is stored as :

10

4 as

100

and -1 is stored as :

...1111111111111111

The only difference being, a computer has a limit. It doesn't have an infinite number of digits, it just stops after 32 digits (or sometimes 64, 16 or 8).

-1 really is stored as :

1111111111111111111111111111111

This is known as Two's Compliment.

When computer store integers using just 8 binary digits (also known as a byte), then it can safely store the numbers -127 (11111111) through 127 (01111111)

We can keep incrementing from zero up until 127, but if we increment once more, we get -127. It's as if the number line from -127 to 127 is bent around to that the two ends touch.

So start thinking about "the number circle" instead.

Going back to our unbounded, numbers with infinite digits, the number line is bent around into a circle of infinite radius. Zero is next door to -1 and 1, or to put it another way,

Zero is next door to ...999999999 and 1

PS. One definition a straight line is a circle of infinite radius.