So, 11111111 11111000 ---(binary to hex)---> FF F8. (Required Answer)
Note:
How is the negative number obtained from 2's complement value?
As stated above, -1 is represented as '11111111 11111111' in memory.
So, the system will take 2's complement of '11111111 11111111' to the get the original negative value back.
Example:
Bit Representation of -1: 11111111 11111111
Since the left most bit is 1, it is a negative number. Then the value is
1's complement: 00000000 00000000 2's complement: 00000000 00000001 (Add 1 to the above result)
Therefore, '00000000 00000001' = 1 and the sign is negative.
Hence the value is -1.
6. In the statement expression1 >> expression2. if expression1 is a signed integer with its leftmost bit set to 1 then on right shifting it the result of the statement will vary from computer to computer