I need to calculate an error correction code for an old protocol.

I calculate the integer 4617 and want to code the 2s compliment in ASCII
hex EDF7.  When issue the following.
>>> hex(-4617)
'-0x1209'   

Does anyone know a clean way to get to the desired results?   My ECC will always
be 16 bit (4 nibble) hex number.

Bill

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to