bitwise shift?
Tobiah
toby at tobiah.org
Wed May 2 15:24:06 EDT 2007
John Machin wrote:
> On 26/04/2007 7:10 AM, Sherm Pendley wrote:
>
>> Shift left is *not* the same as multiplying by k. It is the same as
>> multi-
>> plying by 2^k.
>
> Where I come from, ^ is the exclusive-or operator. Of course YMMV in WV :-)
desktops:toby:ga> bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
2^3
8
--
Posted via a free Usenet account from http://www.teranews.com
More information about the Python-list
mailing list