0

int x=-45. int y=x>>3

i cant fo this bitwise operater

14th Sep 2017, 3:14 PM
Soma Ghosh
Soma Ghosh - avatar
2 odpowiedzi
+ 2
45 =b101101 -45 =b11010011 check it by addition og 45 and -45 3 times shift right: there are only 1 on the left b11111010 b11111010 + 00000110 = 0 so b11111010 = -6
14th Sep 2017, 4:45 PM
Oma Falk
Oma Falk - avatar
0
y=-6
14th Sep 2017, 3:15 PM
Soma Ghosh
Soma Ghosh - avatar