Win a copy of Functional Reactive Programming this week in the Other Languages 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic