What is the result of int 8 >> 1?
-
- 0000 0000 0000 0000 0000 0000 0000 0100
-
- 0000 0000 0000 0000 0000 0000 0000 1000
-
- 0000 0000 0000 0000 0000 0000 0001 0000
-
- 0000 0000 0000 0000 0000 0000 0000 0111
-
- 0000 0000 0000 0000 0000 0000 0000 1001
A
Correct answer
Explanation
The integer 8 in binary is 1000. Performing a right shift by 1 bit (8 >> 1) shifts the bits to the right, resulting in 0100 (which is 4). The 32-bit binary representation of this result has 0100 at the end.