Home Java Master-java Unsigned right shift ">>>" Operator



Unsigned right shift ">>>" Operator
Posted on: September 8, 2007 at 12:00 AM
In this section, you will learn how to use unsigned right shift ">>>"operator in Java.

Unsigned right shift ">>>" Operator

     

In this section, you will learn how to use unsigned right shift ">>>"operator in Java. The Java programming language has operators that perform bitwise operations. In the example below we have shown the usage of  unsigned right shift ">>>"operator.

Description of code:

The unsigned right shift ">>>"operator shifts a zero into the leftmost position however the leftmost position after ">>" depends on sign extension. In the program code given below, this operator has shifted the bits to the leftmost position that is why we have got 19 as an output. 

Here is the code of program: 

public class Unrtshift{
 public static void main(String args[]){
  System.out.println78  >>> 2)
  
 }

Output of the program:

C:\unique>javac Unrtshift.java

C:\unique>java Unrtshift
19

C:\unique>

Download this example.

Related Tags for Unsigned right shift ">>>" Operator:
javaprogrammingormformlanguageiooperatorsoperatorbitwiseoperausageshowifunsignedforexamplebitprogramtoramexamsignedlanshbiesignitshiftwisepeinrmoperationsasmsageminminjoperationagehowprotorrightxaxampsatratioishamplsausawisvatwssrithshoavbeloatihatpleplprmionogro


More Tutorials from this section

Ask Questions?    >>"-Operator.html">Discuss: Unsigned right shift ">>>" Operator   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.