Remix.run Logo
eru 3 hours ago

For unsigned ints, or also for signed ints?

account42 an hour ago | parent | next [-]

Two's complement is a representation specifically for signed integers.

dmitrygr 3 hours ago | parent | prev [-]

For signed. Unsigned overflow was defined for a while now.

gblargg an hour ago | parent [-]

And unsigned negation is two's complement negation as well (-u = 0-u).