This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

shift operators

 
madhu bindu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody exaplin me whats the difference between signed and unsigned right shift operations for negative numbers?I am getting confused alot.for example int i=-5;i>>2=? and also i>>>2=?
Thanks in advance.
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
madhu,
this topic has been discussed an incredible amount of times. Please learn how to use our search engine, type the keywords "shift operators" and I guarantee you will find your answer
 
madhu bindu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Valentin.This is the first time I am using this.Let me try that.
 
It's a beautiful day in this neighborhood - Fred Rogers. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!