In C, are the shift operators (<<, >>) arithmetic or logical?
<<
>>
When you do - left shift by 1 you multiply by 2 - right shift by 1 you divide by 2
x = 5 x >> 1 x = 2 ( x=5/2) x = 5 x << 1 x = 10 (x=5*2)