java - What is arithmetic left shift of 01001001? -



java - What is arithmetic left shift of 01001001? -

i think 00010010 i.e. tries maintain sign bit is

on other hand, logical left shift 1 pos 10010010

is correct?

for left shift, arithmetic , logical shift same.

the difference right shift only, arithmetic right shift re-create old msb new msb after having shifted, keeping negative number beingness converted positive when shifting.

wikipedia has more detailed explanation.

java bit-manipulation

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -