+ 2
Can not understand. How to solve this problem help friends
This task was given to me. Assume the numbers are unsigned 8-bit numbers. Enter your answer as a decimal number (not binary). 7 | (~125 << 3) I answered -9 in decimal notation. But this is wrong.
10 Antworten
+ 5
Answer may be 23
Since numbers are unsigned 8 bit
125 in binary is 01111101 and
~125 is 10000010 which is 130
130 << 3 is 16
And 7 | 16 is 23
+ 4
Sorry, my answer has little bit of correction. But the answer is same.
+ 4
Martin Taylor, but in the question there is no -125 it is ~125. Sorry if I am wrong.
+ 1
sai vamsi thanks 😊
+ 1
Martin Taylor , I think your screen is showing it as negative but it is a bitwise not symbol not negative