5 ms·
How many 'ones complement' machines exist?
by points 16y ago
How many 'ones complement' machines exist?
- sqrt17 16y agoThe most well-known are 30-40 years old by now and predate ANSI C (=c89), some predate even K&R C. They also have 18- or 36-bit words and other oddities. Compare that to non-ASCII systems (e.g. AS/400), which are still much in use now and probably have a sizable bit of C/C++ programs running on them (besides COBOL and Java). If you're programming for one of the more common platforms (i.e., x86, x64, ARM, PowerPC, 68k, MIPS, SPARC, VAX, 8080/Z80, 6502), you'll be safe to assume that ((unsigned)-1), ((unsigned)~0) and ~((unsigned)0) are all the same.
- Natsu 16y agoIt's been quite a while since I heard VAX called one of the "more common" platforms. I'm too young. The only one I ever saw was in an ASU computer lab and we wrote our assembly language assignments on it (86HC11 assembly via some external test board... I don't even know what was in the VAX).