integer to binary...

Grant Edwards grante at visi.com
Sat Jun 3 13:18:21 EDT 2006


On 2006-06-03, Tim Chase <python.list at tim.thechases.com> wrote:
>> The fact that they impliment the xor operator is pretty much
>> proof that integers are stored in binary format -- xor is only
>> defined for binary numbers.
>
> Um...let's not use bad logic/proofs for evidencing this...
>
> >>> hasattr(set(), "__xor__")
> True

Sets aren't numbers.  Perhaps I should have phrased it better:
xor is only defined for numbers if they are represented in
binary.  If numbers were represented in something other than
binary, then an xor operation on those numbers wouldn't make
sense.

-- 
Grant Edwards                   grante             Yow!  .. I want to perform
                                  at               cranial activities with
                               visi.com            Tuesday Weld!!



More information about the Python-list mailing list