public class MainClass { public static void main(String args[]) { byte b = 10; // 00001010 binary byte c = 15; // 00001111 binary b = (byte)(b ^ c); System.out.println("b contains " + b); } }