see it documented anywhere, but I was going to guess it's a logical shift.
Edited by jana, 23 May 2012 - 06:02 PM.
Posted 23 May 2012 - 04:47 PM
Edited by jana, 23 May 2012 - 06:02 PM.
Posted 23 May 2012 - 05:07 PM
Can you tell us why that is important, I'm more intermediate than advanced.Do computations with the right shift operator use a logical or arithmetic shift? I don't
see it documented anywhere, but I was going to guess it's a logical shift.
Posted 23 May 2012 - 05:38 PM
Edited by TheouAegis, 23 May 2012 - 05:46 PM.
Posted 23 May 2012 - 06:00 PM
Can you tell us why that is important, I'm more intermediate than advanced.
Do computations with the right shift operator use a logical or arithmetic shift? I don't
see it documented anywhere, but I was going to guess it's a logical shift.
Edited by jana, 23 May 2012 - 06:00 PM.
Posted 23 May 2012 - 06:01 PM
Arithmetic I think.
If you mean "does it set the carry bit", then the answer is no from what I've seen. ... Seeing as how there's no built-in bitwise rotation function, I don't know how to go about testing it. It's just a simple floor(n/2) shift.
Edit: Sorry, my bad. I forgot about general terms. I haven't tested but that would be easy enough to test. Just take a negative number and apply a right-shift. If it stays negative, it's arithmetic. I'm at work so I can't test just now. But as far as the flooring, I'm pretty sure I saw it floor 3>>1 to 1.
0 members, 0 guests, 0 anonymous users