Count the number of 1's in the binary representation. There are 63 of them. Let's write 64 bits so we can see the leading 0:

```
0111111111111111111111111111111111111111111111111111111111111111
```

That is the maximum 64-bit integer: 63 1 bits with the 64th bit 0. If the leftmost bit were a 1, we'd have `-1`

. Oh dear! When the sign bit is 1 we get negative numbers. That's no good. 64 1's is just too many.

The above, in groups of 4:

```
0111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111
```

And in hex:

```
0111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111
7 f f f f f f f f f f f f f f f
```

`111111111111111111111111111111111111111111111111111111111111111`

in binary is`9223372036854775807`

in base 10 (decimal) and is equivalently`7fffffffffffffff`

in hexadecimal. – not link Apr 16 at 16:39`7f = 127`

– Norrius Apr 16 at 16:49