Hacker News new | ask | show | jobs
by Doxin 3026 days ago
Signedness depends on your interpreter. In practice it hardly matters since there's no print function anyways, so if you want 2s complement you'll end up implementing it yourself anyways.

[+] should always overflow to 0 at some point, which is entirely doable for 8 bit, but less so for 32bit. as for choosing between [-] and [+] you'll just have to guesstimate if 0 or intmax is on average closer to your value.