DSPRelated.com
Forums

Quantization Error

Started by ArunPrakash September 28, 2015
On Tue, 29 Sep 2015 06:55:30 +0000, glen herrmannsfeldt wrote:

> Tim Wescott <seemywebsite@myfooter.really> wrote: >> On Mon, 28 Sep 2015 19:19:50 -0400, robert bristow-johnson wrote: > > (snip) > >>> he was saying "1s complement" (which is the same as "sign-magnitude"), >>> in which if the truncation is done by masking off the bits, it will >>> always "round toward zero". but i dunno anybody other than IEEE-754 >>> that is doing sign-magnitude. > > (snip) > >> One's compliment and sign-magnitude are not the same: <https:// >> en.wikipedia.org/wiki/ >> Signed_number_representations#Signed_magnitude_representation>. > > Ones complement is what you get exclusive oring all the non-sign bits > with the sign bit. In the sense Robert was using it, the result is the > same.
I was not arguing with his results, I was just picking nits with his declaration that one's compliment was the same thing as sign-magnitude. They're not. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On 9/29/15 2:55 AM, glen herrmannsfeldt wrote:
> Tim Wescott<seemywebsite@myfooter.really> wrote: >> On Mon, 28 Sep 2015 19:19:50 -0400, robert bristow-johnson wrote: > > (snip) > >>> he was saying "1s complement" (which is the same as "sign-magnitude"), >>> in which if the truncation is done by masking off the bits, it will >>> always "round toward zero". but i dunno anybody other than IEEE-754 >>> that is doing sign-magnitude. > > (snip) > >> One's compliment and sign-magnitude are not the same:<https:// >> en.wikipedia.org/wiki/ >> Signed_number_representations#Signed_magnitude_representation>. >
ooops, you're right. i knew that, but i misremembered.
> Ones complement is what you get exclusive oring all the non-sign > bits with the sign bit. In the sense Robert was using it, the > result is the same.
no, i fucked it up, Glen. i conflated 1's comp with sign magnitude. the difference between 1's comp and 2's comp is the number 1.
> > If someone inverted all the bits of a bit representation, would > you consider it the same enough? > >> One's compliment denotes negative numbers by changing the sense of _all_ >> the bits.
1's comp as both +0 and -0. and 1's comp need not worry about the asymmetric overflow from negating 0x8000. that was probably the only 68000 programming trick i learned from Ralph Muha's code at Kurzwiel. very useful trick (with the expense of a tiny bit of deterministic error that you might be able to account for somewhere else in the signal chain) that saves a few instructions.
> Sign-magnitude just sets the sign bit.
and that's what i was thinking and i conflated it with 1's complement. that was a mistake and i should have known better. thanks for the support, Glen. but i goofed it up a little. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On 9/29/15 4:14 PM, Tim Wescott wrote:
> On Tue, 29 Sep 2015 06:55:30 +0000, glen herrmannsfeldt wrote: > >> Tim Wescott<seemywebsite@myfooter.really> wrote: >>> On Mon, 28 Sep 2015 19:19:50 -0400, robert bristow-johnson wrote: >> >> (snip) >> >>>> he was saying "1s complement" (which is the same as "sign-magnitude"), >>>> in which if the truncation is done by masking off the bits, it will >>>> always "round toward zero". but i dunno anybody other than IEEE-754 >>>> that is doing sign-magnitude. >> >> (snip) >> >>> One's compliment and sign-magnitude are not the same:<https:// >>> en.wikipedia.org/wiki/ >>> Signed_number_representations#Signed_magnitude_representation>. >> >> Ones complement is what you get exclusive oring all the non-sign bits >> with the sign bit. In the sense Robert was using it, the result is the >> same. > > I was not arguing with his results, I was just picking nits with his > declaration that one's compliment was the same thing as sign-magnitude. >
and i had a very plain nit.
> They're not.
of course, you're correct, Tim. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."