Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the biggest number in a computer?

Just asked by my 5 year old kid: what is the biggest number in the computer?

We are not talking about max number for a specific data types, but the biggest number that a computer can represent.

Infinity is not allowed.

UPDATE my kid always wants to print as well, so lets say the computer needs to print this number and the kid to know that its a big number. Of course, in practice we won't print because theres not enough trees.

like image 527
Yehonatan Avatar asked Sep 14 '10 11:09

Yehonatan


People also ask

How big of a number can a computer store?

Integers are commonly stored using a word of memory, which is 4 bytes or 32 bits, so integers from 0 up to 4,294,967,295 (232 - 1) can be stored. Below are the integers 1 to 5 stored as four-byte values (each row represents one integer).

What is the 1 largest number?

Googol. It is a large number, unimaginably large. It is easy to write in exponential format: 10100, an extremely compact method, to easily represent the largest numbers (and also the smallest numbers). With the smallest of effort, you can also present it in the full format: a “one” followed by one hundred “zeros”.

What is biggest number in 64-bit computer?

A 64-bit signed integer. It has a minimum value of -9,223,372,036,854,775,808 and a maximum value of 9,223,372,036,854,775,807 (inclusive). A 64-bit unsigned integer.

What is the largest number type?

It is written as 10googol. The number 10googol can also be expressed in the exponential format that will equal 1010^100.


2 Answers

This question is actually a very interesting one which mathematicians have devoted a fair bit of thought to. You can read about it in this article, which is a fascinating and accessible read.

Briefly, a guy named Tibor Rado set out to find some really big, but still well-defined, numbers by defining a sequence called the Busy Beaver numbers. He defined BB(n) to be the largest number of steps any Turing Machine could take before halting, given an input of n symbols. Note that this sequence is by its very nature not computable, so the numbers themselves, while well-defined, are very difficult to pin down. Here are the first few:

BB(1) = 1 BB(2) = 6 BB(3) = 21 BB(4) = 107 

... wait for it ...

BB(5) >= 8,690,333,381,690,951 

No one is sure how big exactly BB(5) is, but it is finite. And no one has any idea how big BB(6) and above are. But at least these numbers are completely well-defined mathematically, unlike "the largest number any human has ever thought of, plus one." ;)

So how about this:

The biggest number a computer can represent is the most instructions a program small enough to fit in its available memory can perform before halting.

Squared.

No, wait, cubed. No, raised to the power of itself!

Dammit!

like image 193
Tom Crockett Avatar answered Sep 20 '22 18:09

Tom Crockett


Bits are not numbers. You, as a programmer, give them the meaning you want, possibly numbers.

Now, I decide that 1 represents "the biggest number ever thought by a human plus one".

like image 28
Alexandre C. Avatar answered Sep 20 '22 18:09

Alexandre C.