hi friend,
if byte variable contains the bits 10110011 means it is not 179.
if the sign bit (leftmost bit) is one means the value stored inside that variable is negative . in this case the value inside the variable is found as follows ,
10110011
(-) 1
-------------
10110010
after that get 1's complement for the result
i.e 01001101 = 77
actually the value stored in x is -77
after x>>2
11011001 (1st shift)
11101100 (2nd shift)
(>> operator wont shift sign bit)
so, the value of x>>2(11101100) is negative (becoz here left most bit is 1)
S.D.Balasubramani
SCJP 1.4
Balasubramani SD,<br />SCJP 1.4,SCWCD 1.4,SCJP 5.0<br /><a href="http://sd.balasubramani.googlepages.com" target="_blank" rel="nofollow">www.sd.balasubramani.googlepages.com</a>