[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mailing list vs "the futur"

On 25/08/2018 05:45, Eric S Fraga wrote:
On Friday, 24 Aug 2018 at 20:15, Reco wrote:
-INT_MAX. I win.
-1 (wraps around so = INT_MAX) and I win!

No, it is the other way around for two's complement:


Two's complement is unbalanced. You do not know the power of the dark (negative) side.

For example, for signed 32-bit integers using two's complement (C/C++ int on most current architectures and JVM int).

INT_MAX = 2**31 - 1 = 2147483647

INT_MIN = -2**31 = -2147483648


Kind regards,

Ben Caradoc-Davies <ben@transient.nz>
Transient Software Limited <https://transient.nz/>
New Zealand

Reply to: