Path: utzoo!attcan!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.lang.c Subject: Re: question about shift operator Message-ID: <414@auspex.UUCP> Date: 8 Nov 88 18:30:35 GMT References: <786@gtx.com> <192@libove.UUCP> Reply-To: guy@auspex.UUCP (Guy Harris) Distribution: na Organization: Auspex Systems, Santa Clara Lines: 17 >Now, why is there any question as to the result? Because: 1) the intent was that shifts be implemented using the machine's shift instructions, with as little extra decoration as possible; and 2) some machines take the shift count modulo the word size, and others don't, so some machines, when told to shift left (word size) bits, will shift (word size) bits, clearing the word, and others will shift left 0 bits. The language spec specifically allows for this, by not specifying what happens if you have a shift count >= (word size).