+ 1
c=a<<2 when a=-33
Please solve and show the steps
1 Antwort
+ 8
If a is of int type then the bit pattern of `-33` (in 2's complement) would be like so (in a 32-bit word)
1111 1111 1111 1111 1111 1111 1101 1111 == -33
and applying `a << 2` manipulate the pattern to this one
1111 1111 1111 1111 1111 1111 0111 1100 == -132