The Cyber-Spy.Com Usenet Archive Feeds Directly
From The Open And Publicly Available Newsgroup
This Group And Thousands Of Others Are Available
On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic,
Opinions Or Content Posted To This Or Any Other
Newsgroup. This Web Archive Of The Newsgroup And
Posts Are For Informational Purposes Only.
Reply-To: "fred bartoli"
From: "fred bartoli"
References: <3DAF76EE.330238C2@SpamMeSenseless.pergamos.net> <1yVr9.234484$TX5.firstname.lastname@example.org> <3DB0287A.FD10BE65@webaccess.net>
Subject: Re: DSP 2's complement vs straight binary
Date: Fri, 18 Oct 2002 18:52:06 +0200
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
Organization: Guest of ProXad - France
NNTP-Posting-Date: 18 Oct 2002 18:50:44 MEST
Chuck Simmons a écrit dans le message :
> George wrote:
> > In article > >, email@example.com says...
> > > Like I was telling John Larkin simply inverting the MSB
> > > does not convert straight binary to 2's complement. Here
> > > is a website that explains 2's complement.
> > > http://www.ibilce.unesp.br/courseware/datas/numbers.htm
> > > But you are right, there is hardwire solution for the
> > > conversion, but I hate adding extra circuitry to solve a
> > > problem like this. In software it looks like it would
> > > take a few executions for the conversion, but when we're
> > > talking about megabytes of samples it does add up.
> > > P.S. I'm looking for a 8 bit sampler.
> > How about using a lookup table? Just one operation
> > immediately after sampling, and then the samples are stored
> > in the desired format.
> That's complicated in many DSPs.
> The problem is not posed correctly. This is not a conversion from binary
> to twos complement. It is a case of subtracting an offset of half of
> full scale plus one. If you don't care about the borrow, this is exactly
> the same as inverting the MSB.
Yes, and in the case of an ADC that's used for bipolar inputs (which makes
sense if the OP wants to do FFTs...) you already have the offset.
For a 8bits ADC centered around the midscale
-> 82 -> 02
0V+ -> 81 -> 01
0V -> 80 -> 00
0V- -> 7f -> ff
-> 7e -> fe
which is the right result, and AD is OK.
> ... The times have been,
> That, when the brains were out,
> the man would die. ... Macbeth
> Chuck Simmons firstname.lastname@example.org
Go Back To The Cyber-Spy.Com
Usenet Web Archive Index Of
The sci.electronics.design Newsgroup