/*
9
原码:00000000 00000000 00000000 00001001
-9
原码:10000000 00000000 00000000 00001001
反码:11111111 11111111 11111111 11110110
补码:11111111 11111111 11111111 11110111
7
原码:00000000 00000000 00000000 00000111
-7
原码:10000000 00000000 00000000 00000111
反码:11111111 11111111 11111111 11111000
补码:11111111 11111111 11111111 11111001
*/
public class BitOperator{
public static void main(String[] args){
System.out.println(9&7);
System.out.println(9&-7);
System.out.println(-9&-7);
System.out.println(-9|-7);
System.out.println(~-9);
System.out.println(-9^-7);
System.out.println(-9<<3);
System.out.println(-9>>3);
System.out.println(-9>>>3);
}
}