자바 비트 연산, 쉬프트 연산자
·
앱 개발/Java
High byte, low byte 추출 실무 중 열받아서 정리하게 되었습니다 다른 분들도 보고 도움이 되셨으면 좋겠습니다 [MainActivity.Java] byte aa = (byte)0x31 Log.d("Simulators", "high byte는 1 " + Integer.toHexString(aa & 0xF0)); //hihg byte만 추출(0x30) Log.d("Simulators", "high byte는 2 " + Integer.toHexString(aa & 0xf0)); //위와 동일(소문자 써도 됌) Log.d("Simulators", "low byte는 " + Integer.toHexString(aa & 0x0f)); //low byte만 추출(0x01) Log.d("Simulators..