• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Bitwise operators

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can nebody help me in understanding bitwise operators.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
shikha
have u gone through any book on these operators?
which ones are u not clear on?
pls. answer so that i may be of some help.
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check out marcus green site www.jchq.net for good tutorial on bitwise operators
 
Shikha Sood
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi swikriti
can u give me some handy tips on how to >> ,<< operators work<br /> what does this statement means 46<<2,46>>2,46>>>2
Kindly explain
thanx
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Shikha,
U want to know about 46<<2.<br /> 1)Convert 46 into binary.<br /> 46=0010 1110<br /> 2)Shift the bits in binary number towards left by 2 i.e<br /> original number =0010 1110<br /> After first shift=0101 1100<br /> After second shift=1011 1000<br /> This is equivalent to 184<br /> Similarly 46>>2,but shift wright.But it is diferent for -ve numbers.
Hope this will help.
 
Yes, my master! Here is the tiny ad you asked for:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic