Dennis Lee Bieber wrote: > On Sun, 30 Jul 2006 16:39:47 -0500, Philippe Martin > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> >> My apologies, I clearly made a mistake with my calculator, yes the >> resulting array I would need is [0xb,0xc,0x6,0x1,0x4,0xe] >> > Take note that this is NOT a BCD form for "12345678". BCD (typically > packed) uses four bits per decimal digit. That would make "12345678" => > 0x12, 0x34, 0x56, 0x78 (ignoring matters of big/little end). > > The binary representation of 12345678, in bytes, is 0xBC, 0x61, 0x4E > > 0xb, 0xc... is really 0x0B, 0x0C... 8-bits per byte, with MSB set to > 0000. > > Compare: > BCD 00010010 00110100 01010110 01111000 > binary 10111100 01100001 01001110 > your 00001011 00001100 00000110 00000001 00000100 00001110 > -- > Wulfraed Dennis Lee Bieber KD6MOG > [EMAIL PROTECTED] [EMAIL PROTECTED] > HTTP://wlfraed.home.netcom.com/ > (Bestiaria Support Staff: [EMAIL PROTECTED]) > HTTP://www.bestiaria.com/ Yes I realized that after writing it.
Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list