wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes bitwise operations on negative numbers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "bitwise operations on negative numbers" Watch "bitwise operations on negative numbers" New topic
Author

bitwise operations on negative numbers

K Anshul
Ranch Hand

Joined: May 19, 2004
Posts: 71
Please tell me hoe to perform bitwise operations on negative numbers
Something like

1.(-1>>1)
2.(-1>>>1)
3.(-1<<1)
4.(-1>>-1)
5.(1>>-1)
arnel nicolas
Ranch Hand

Joined: Dec 16, 2003
Posts: 149
There is good tutorial on that
here

Hope this helps you.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Corey's Shift Buster


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
K Anshul
Ranch Hand

Joined: May 19, 2004
Posts: 71
Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: bitwise operations on negative numbers