+ 1

c=a<<2 when a=-33

Please solve and show the steps

25th Nov 2018, 6:00 AM
SOMA HALDER ROY
SOMA HALDER ROY - avatar
1 Answer
+ 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
25th Nov 2018, 6:20 AM
Babak
Babak - avatar