Hacker News new | ask | show | jobs
by svisser 4240 days ago
Why does this happen?
1 comments

it's a signed int... ones' complement.
Indeed, if you want 0/1, use unsigned int, not signed int!