Jul 10

The following table shows the shift oprators present in Java Language.

Operator Use Description
>> A>>B It is Right shift operator.

It is arithmetic or signed operator.

Shifts the binary number A towards right by B times and fills the vacated bit positions by left-most bit present in original binary value of A.

<< A<<B It is Left shift operator.

It is arithmetic or signed operator.

Shifts the binary number A towards left by B times and fills the vacated bit positions by left-most bit present in original binary value of A.

>>> A>>>B It is logical or unsigned right operator.

Shifts the binary number A towards right by B times and fills the vacated bit positions by zeros.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Blogplay
  • LinkedIn
  • MySpace
  • Reddit
  • RSS
  • Twitter

written by Anup