Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!aramis.rutgers.edu!athos.rutgers.edu!rbthomas From: rbthomas@athos.rutgers.edu (Rick Thomas) Newsgroups: comp.os.minix Subject: Re: comment on 1.4b limits.h Message-ID: Date: 11 Nov 89 06:37:42 GMT References: <1677@bruce.OZ> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 23 Earl Chew, says -- > Does this mean that, in general, you can't trust the bitwise operations to do > anything portably? No. Bitwise operations are portable. But in order to be portable, they must be performed on bitcluster entities -- not numbers. C does not explicitly have such a datatype, but instead uses unsigned integers of various lengths in its place. The real problem is that there is no defined bitcluster constant representation. Without that you cannot portably represent bit masks. Fortunately unsigned octal and hexadecimal constants have the same representation in both 2-s compliment and 1-s compliment notation and those are the two most common choices, with 2-s compliment being way far out ahead. Has anybody tried to port Minix to a 1-s compliment machine, such as the Unisys 1100/2200 series? -- Rick Thomas uucp: {ames, att, harvard}!rutgers!jove.rutgers.edu!rbthomas internet: rbthomas@JOVE.RUTGERS.EDU bitnet: rbthomas@zodiac.bitnet Phone: (201) 932-4301