Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #10911

Re: problem with bcd and a number

From Peter Pearson <ppearson@nowhere.invalid>
Newsgroups comp.lang.python
Subject Re: problem with bcd and a number
Date 2011-08-05 16:01 +0000
Message-ID <9a2ifcF1k7U1@mid.individual.net> (permalink)
References <31c8d075-2901-46eb-adcf-1c1803ab7938@a4g2000yqg.googlegroups.com> <mailman.1901.1312486523.1164.python-list@python.org> <j1etad$f5e$1@online.de>

Show all headers | View raw


On Thu, 04 Aug 2011 21:52:45 +0200, Christoph Hansen <ch@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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

problem with bcd and a number nephish <nephish@gmail.com> - 2011-08-04 11:26 -0700
  Re: problem with bcd and a number Ethan Furman <ethan@stoneleaf.us> - 2011-08-04 12:44 -0700
  Re: problem with bcd and a number MRAB <python@mrabarnett.plus.com> - 2011-08-04 20:35 +0100
    Re: problem with bcd and a number Christoph Hansen <ch@radamanthys.de> - 2011-08-04 21:52 +0200
      Re: problem with bcd and a number Peter Pearson <ppearson@nowhere.invalid> - 2011-08-05 16:01 +0000
  Re: problem with bcd and a number Ethan Furman <ethan@stoneleaf.us> - 2011-08-04 13:14 -0700

csiph-web