Logo 
Search:

Java Articles

Submit Article
Home » Articles » Java » Homework HelpRSS Feeds

Program to show the use of Bitwise Operator (~) Complement

Posted By: Asir Hashmi     Category: Java     Views: 97441

A Java Program to show the use of Bitwise Operator (~) Complement.

Code for Program to show the use of Bitwise Operator (~) Complement in Java

publicclass JAVA_010
 {

    publicstaticvoid main(String[] args)
    {
       int a=26317;  // 0110011011001101int b=(~a);   // 1001100100110010

       System.out.println("a = 0110011011001101 = " + a);
       System.out.println("b = ~a = 1001100100110010 = " + b);
    }
 }
  
Share: 


Didn't find what you were looking for? Find more on Program to show the use of Bitwise Operator (~) Complement Or get search suggestion and latest updates.

Asir  Hashmi
Asir Hashmi author of Program to show the use of Bitwise Operator (~) Complement is from Hyderabad, Pakistan.
 
View All Articles

 
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!