From: "John S. Fine" Newsgroups: comp.os.msdos.djgpp Subject: Re: Possible bit shifting bug ... Date: Tue, 04 Aug 1998 18:35:35 -0400 Organization: RCN Internet Message-ID: <35C78CB7.5D9A@erols.com> References: <000601bdbff2$503f04a0$1901030a AT WS-hkatirai DOT netpartners DOT com> Reply-To: johnfine AT erols DOT com NNTP-Posting-Host: 207-172-240-103.s40.as2.bsd.erols.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 13 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hooman Katirai wrote: > j << 1; > The output is only a series of '1's. No bitshifting ever took place. Because you didn't tell it to store the result anywhere. You should have used j <<= 1; which has the effect of j = j << 1; -- http://www.erols.com/johnfine/ http://www.geocities.com/SiliconValley/Peaks/8600/