problem with bcd and a number

Peter Pearson ppearson at nowhere.invalid
Fri Aug 5 18:01:48 CEST 2011


On Thu, 04 Aug 2011 21:52:45 +0200, Christoph Hansen <ch at radamanthys.de> wrote:
> MRAB schrieb:
>
>> The value is MSB * 100 + (LSB>>  4) * 10 + (LSB&  0xF)
>
> i would say
>
> (MSB >> 4)*100 + (MSB & 0xF)*10 + (LSB >> 4)
>
> but who knows

I concur.  I think the documentation is trying to say that the
low-order nibble of the LSB is garbage.

-- 
To email me, substitute nowhere->spamcop, invalid->net.



More information about the Python-list mailing list