JAVA 쉬프트 연산자
[JAVA 기초] 쉬프트 연산자(shift operator)
쉬프트 연산자 (>)는 피 연산자의 각 자리를 오른쪽(>>) 왼쪽( 0, toBinaryString(dec >> 0)); System.out.printf("%d >> %d = %4d \t%s%n", dec, 1, dec >> 1, toBinaryString(dec >> 1)); System.out.printf("%d >> %d = %4d \t%s%n", dec, 2, dec >> 2, toBinaryString(dec >> 2)); System.out.printf("%d > %d = %4d \t%s%n", dec, 1, dec >> 1, toBinaryString(dec >> 1)); System.out.printf("%d >> %d = %4d \t%s%n", dec, 2, dec >> 2, toBina..