public class lec0322_1 {
public static void main(String[] args) {
//산술연산
int a = 120, b = 'c';
/// 단항
System.out.println(a++);
System.out.println(++a);
int x = a++ - ++a; //
System.out.println(x);
// 사칙과 나머지
int c = a / b;
int d = a % b;
System.out.println(a + "," + b + "," + c + "," + d);
byte i = 10, j = 2;
byte k = (byte)(i + j);
a = 1_000_000;
long t = a * (2 * a);
System.out.println(t);
// 비트연산(정수만 됨)
a = 120;
int e = a << 2;
int f = a >> 5;
System.out.println(Integer.toBinaryString(a));
System.out.println(Integer.toBinaryString(e));
System.out.println(Integer.toBinaryString(f));
int m = 0b1011_0101;
System.out.println(Integer.toBinaryString(m & 0b1111));
System.out.println(Integer.toBinaryString(m | 0b1111));
a=3; b=4; c=4;
System.out.println(a^b^c);
System.out.println(Integer.toBinaryString(~m));
}
}