Time Limit: 1s
Memory Limit: 128MB
Short 범위에 해당되는 값을 입력 받아, binary로 출력하는 프로그램을 작성하세요.
A short value S is stored in 16 bits. Write a program that prompts the user to enter a short integer and displays the 16 bits for the integer.
* Line 1 : 테스트케이스 T (1~1,000)
* Line 2 ~ T+1 : S (-32,768~32,767)
* Line 1 ~ T : S에 대한 bit 표현
2 5 -5
0000000000000101 1111111111111011
You need to use the bitwise right shift operator (>>) and the bitwise AND operator (&), which are covered in Appendix G, Bitwise Operations.
JAVA2015 PE5.44