Logo 
Search:

Java Articles

Submit Article
Home » Articles » Java » Homework HelpRSS Feeds

Program to show the use of operator (<<) Shift Left filling with zero from the right

Posted By: Alice Stewart     Category: Java     Views: 2632

A Java Program to show the use of operator (<<) Shift Left filling with zero from the right.

Code for Program to show the use of operator (&lt;&lt;) Shift Left filling with zero from the right in Java

publicclass JAVA_011
 {

    publicstaticvoid main(String[] args)
    {
       int a=59085;  // 1110011011001101int b=(a<<3); // 0011011001101000

       System.out.println("a = 1110011011001101 = " + a);
       System.out.println("b = a<<3 = 0011011001101000 = " + b);
    }
 }
  
Share: 



Alice Stewart
Alice Stewart author of Program to show the use of operator (<<) Shift Left filling with zero from the right is from Denver, United States.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!