Hacker News Viewer

The largest number representable in 64 bits

by tromp on 2/2/2026, 6:31:36 PM

https://tromp.github.io/blog/2026/01/28/largest-number-revised

Comments

by: tromp

Please no more comments to the extent of "i can define a much larger number in only 1 bit". What makes my blog post (hopefully) interesting is that I consider tiny programs for computing huge numbers in non-cheating languages, that are not specifically equipped for doing so.

2/2/2026, 9:14:38 PM


by: cortesoft

This feels like the computer science version of this article: <a href="https:&#x2F;&#x2F;www.scottaaronson.com&#x2F;writings&#x2F;bignumbers.html" rel="nofollow">https:&#x2F;&#x2F;www.scottaaronson.com&#x2F;writings&#x2F;bignumbers.html</a>

2/2/2026, 7:41:03 PM


by: o_nate

Whatever largest number you can express in your system, I can represent a larger one in only one bit, using the following specification.<p>0=your largest number 1=your largest number + 1

2/2/2026, 9:02:44 PM


by:

2/2/2026, 9:10:41 PM


by: its-summertime

It all goes over my head, but, what does the distribution of values look like? e.g. for unsigned integers its completely flat, for floating point its far too many zeros, and most of the numbers are centered around 0, what do these systems end up looking like?

2/2/2026, 8:47:00 PM


by: dooglius

I&#x27;m going to agree with the downvoted people and say that this sort of approach is largely meaningless if you allow arbitrary mappings. IMO the most reasonable mathematical formulation given the structure of the integers (in the sense of e.g. Peano) is that to truly represent an integer you have to represent zero and each other representable number has a representable predecessor, i.e. to say you can represent 5 you need 0,1,2,3,4, and 5 to be representable. By a straightforward counting argument, 2^64-1 is then the largest representable number, in other words the obvious thing is right.

2/2/2026, 8:40:31 PM


by: kstrauser

What&#x27;s the biggest up-arrow notation number you can spell with 64 bits?<p><a href="https:&#x2F;&#x2F;mathworld.wolfram.com&#x2F;KnuthUp-ArrowNotation.html" rel="nofollow">https:&#x2F;&#x2F;mathworld.wolfram.com&#x2F;KnuthUp-ArrowNotation.html</a>

2/2/2026, 7:54:47 PM


by: dmitrygr

Given time, this will output a bigger number, and it is only 48 bits:<p><pre><code> B0 39 mov al,&#x27;9&#x27; &#x2F;&#x2F;load character &#x27;9&#x27; to AL CD 29 int 29h &#x2F;&#x2F;print to screen EB FA jmp short -6 &#x2F;&#x2F;go again</code></pre>

2/2/2026, 8:29:43 PM


by: heyitsdaad

bits == entropy.<p>Everything else is word play.

2/2/2026, 7:49:28 PM


by: gegtik

I can do you one better. I can represent the largest number with a single binary bit.

2/2/2026, 8:10:51 PM


by: bmacho

Can you give a formulation of the <i>problem</i> you are trying to answer?

2/2/2026, 8:13:14 PM


by: IshKebab

Once you allow any format the question is completely meaningless. You can just define 0 to mean any number you want.

2/2/2026, 7:52:06 PM


by: Sharlin

FWIW, w218 equals<p>627,421,742,590,461,754<p>or<p>0x08B5_0CC0_2B76_073A<p>in case someone would like to memorize it or something.

2/2/2026, 7:43:38 PM


by: masfuerte

&gt; The largest number (currently known to be) representable in 64 bits is w218<p>In my representation the bit pattern 00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000001 stands for the number w218+1.<p>I win!

2/2/2026, 7:38:22 PM