Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
It probably shifts through a caret...
Instead of
01010110 - >10101100
It does
[0] 11100111 - > [1]11001110
The [] is just a "inbetween" savetate of your last byte... Hope it helps -
Dreaming518y@linuxer4fun Yeah a friend of mine explained it to me, it "triggers" the overflow flag, so it does not change sign. Thanks!
-
@Dreaming BTW : wittmaxi@outlook.de is my adress, feel free to always ask me questions about asm... Stackoverflow wont do any good
-
There's a difference between arithmetic shifting, and logical shifting. Logical shifting moves the entire bit pattern left or right, while arithmetic shifting preserves the sign bit.
There's also another kind of shift called a rotate, where the bits going off the end of the word aren't lost but are shifted into the other end.
Related Rants
-
TCPizza28assignment: use winAPI to create a "virus" that put itself in autorun and does nothing. me, a curious student...
-
mcminnra10"Python is such a hard language. It has so many rules" - Undergraduate Student who sent out mass email to the ...
-
arch-chroot2Boss: For next project I suggest we use webassembly Me: Why not use real assembly
Assembly IA-32
Does someone know why arithmetic left shift changes the original binary number's sign (1 to 0,vice versa) , but arithmetic right shift keeps the same sign?
undefined
ia-32
assembly
just intel things