Question d’entretien chez Google

Difference between arithmetic and logical shift

Réponses aux questions d'entretien

Utilisateur anonyme

8 avr. 2010

I think..... arithmetic right shift will shift in the sign bit while preserving the sign bit .. Logical shift always shifts in zeros no matter in which direction you do the shift

2

Utilisateur anonyme

23 juill. 2010

That's correct. Moreover, in Java the arithmetic right shift operator is >> whereas the logical right shift is >>>