RSS Forums RSS
Please support our C advertiser: Programming Forums

bitwise operations in C

Join Date: Feb 2006
Location: UK
Posts: 479
Reputation: Bench has a spectacular aura about Bench has a spectacular aura about Bench has a spectacular aura about 
Rep Power: 5
Solved Threads: 47
Bench's Avatar
Bench Bench is offline Offline
Posting Pro in Training

Re: bitwise operations in C

  #5  
May 1st, 2006
ch2=pow(2,index + 1);
Why did you add 1 to the index? - 32 (2^5) in binary is 00100000 - The code would give your expected result without that.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:32 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC