Hi,
My background is c/c++ and java. I'm learning python at this point.
My question is does python share java's peculiar mode of bit shifting, or
does python adhere closer to c's bit shifting?
in java there are 3 kinds of bit shifts:
<< (shift left)[color=blue][color=green]
>> (preserve the sign bit as we move right )[color=darkred]
>>> (0 filled on the left as we move right)[/color][/color][/color]
In C, the behavior is
<< (shift left)[color=blue][color=green]
>> (shift right , 0 filled (like java's >>>'))[/color][/color]
I tried looking around but haven't really got an answer yet. I guess I need
to write a mini python script. Please don't write any code, I'm just
looking for a website or something where I can figure this stuff out in
python.
Thanks in advance,
David
-------
Cell: http://cellphone.duneram.com/index.html
Cam: http://www.duneram.com/cam/index.html
Tax: http://www.duneram.com/index.html
_______________ _______________ _______________ _______________ _____
FREE pop-up blocking with the new MSN Toolbar – get it now!
My background is c/c++ and java. I'm learning python at this point.
My question is does python share java's peculiar mode of bit shifting, or
does python adhere closer to c's bit shifting?
in java there are 3 kinds of bit shifts:
<< (shift left)[color=blue][color=green]
>> (preserve the sign bit as we move right )[color=darkred]
>>> (0 filled on the left as we move right)[/color][/color][/color]
In C, the behavior is
<< (shift left)[color=blue][color=green]
>> (shift right , 0 filled (like java's >>>'))[/color][/color]
I tried looking around but haven't really got an answer yet. I guess I need
to write a mini python script. Please don't write any code, I'm just
looking for a website or something where I can figure this stuff out in
python.
Thanks in advance,
David
-------
Cell: http://cellphone.duneram.com/index.html
Cam: http://www.duneram.com/cam/index.html
Tax: http://www.duneram.com/index.html
_______________ _______________ _______________ _______________ _____
FREE pop-up blocking with the new MSN Toolbar – get it now!
Comment