hexadecimal calculations
Mike C. Fletcher
mcfletch at rogers.com
Fri Apr 18 19:26:28 EDT 2003
Did you try it at the command line? Hexidecimal numbers are prefixed
with 0x, XOR is spelled ^, and you can see the hex representation of a
number with the built-in hex function:
hex(0xA0 ^ 0x79)
I'll leave the other as an exercise for the reader.
Mike
Andros wrote:
>Hello,
>how to make these hexadecimal calculations in python?
>A0 XOR 79 = D9
>D9 - A8 = 31
>
>Thanks ;)
>
>
>
>
>
--
_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/
More information about the Python-list
mailing list