Java-Bitwise Exclusive OR

Bitwise Exclusive OR( ^ )

The bitwise exclusive OR is represented by the symbol (^). The result of exclusive OR is 1 if only one bits of the bits is 1; otherwise it is zero.

Program

gdfgdfg

Program Source

public class Javaapp {

    public static void main(String[] args) {
        
        int a = 10;
        int b = 12;
        int c = a ^ b;
        System.out.println("Value of c = "+c);
    }
}

Leave a Comment