0

If I have a number made of 128 1 and 128 0 (256 bits) and I convert it to 10 base integer I get:

115792089237316195423570985008687907852929702298719625575994209400481361428480

and if I square the number 2 with 256 I get:

115792089237316195423570985008687907853269984665640564039457584007913129639936

But taking a close look, the second number which should represent maximal 256 bits number is smaller than the first one which has 256 bits. How can this be explained?

DDS
  • 3,199
  • 1
  • 8
  • 31

2 Answers2

3

Actually, the second number is larger. I indicated the first digit where they change:

$11579208923731619542357098500868790785\color{red}2929702298719625575994209400481361428480$

$11579208923731619542357098500868790785\color{red}3269984665640564039457584007913129639936$

Bram28
  • 100,612
  • 6
  • 70
  • 118
  • No, they are equal! https://www.google.com/search?q=115792089237316195423570985008687907852929702298719625575994209400481361428480-115792089237316195423570985008687907853269984665640564039457584007913129639936 – dcolazin Jun 22 '19 at 16:20
  • 1
    And Google never lies! OMG – Bram28 Jun 22 '19 at 16:21
2

Given $n=128,$ then the first number is $4^n-2^n$ while the second is $4^n$ which is obviously larger. If you look closely, the two number have the same digits up to halfway and differ after that. By the way, the number $4^n-1$ is the maximum number with $256$ bits and $4^n$ is the first number that requires $257$ bits.

Somos
  • 35,251
  • 3
  • 30
  • 76