Hacker News new | ask | show | jobs
by bio_end_io_t 2966 days ago
This assumes negatives are represented as two's-complement, but that's implementation-defined. Testing whether a negative number is even by ANDing it with 1 won't work in a system that uses one's-complement.
1 comments

Which systems don't use two's complement?
Unisys apparently ships some emulators of a old system that still use one's complement... much as I hesitate to ever link to any ESR material, there's a good article here:

http://esr.ibiblio.org/?p=7413

A handful of ancient legacy systems. Very few people today need to worry about their webapp being ported over to UNIVAC.