Where is the '1-bit' problem of simple I2S inverter? - diyAudio
Go Back   Home > Forums > Source & Line > Digital Source

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 15th August 2011, 12:48 PM   #1
oshifis is offline oshifis  Hungary
diyAudio Member
 
Join Date: Mar 2004
Location: Budapest, Hungary
Default Where is the '1-bit' problem of simple I2S inverter?

Thinking about inverting the I2S signal and producing L+/L- and R+/R- for balanced DAC operation.

I am trying to understand where the alleged 1-bit shift is coming when a simple inverter is used, instead of the more difficult 32-bit shift register solution described elsewhere. Obviously the L+ and L- can not be handled by the same chip with the simple inverter.

The issue is I don't see any 1-bit shift with the simple inverter, others are referring to. Let's take the offset binary range 0000 to FFFF. The 2s complement will be 8000 to 7FFF, the zero is 0000, -1 is represented by FFFF, +1 is represented by 0001. Now, inverting the binary signal and adding it to the original results 0000 (overflow truncated). I don't see any 1-bit shift.

Here is another thing that confuses me: let's take the analog signal. Any positive value between 0 and +LSB converts to 0000. Any negative value between 0 and -LSB converts to -1 (FFFF in 2s complement representation). So a small noise superposed on zero will cause alternating between 0000 and FFFF. This is because there is no round-up, just truncation. Does it mean the "real" analog zero is at -1/2, i.e. halfway between 0 and -1?

Should we worry about this at all, or is it just pure perfectionism?
  Reply With Quote
Old 15th August 2011, 03:20 PM   #2
poynton is offline poynton  United Kingdom
diyAudio Member
 
poynton's Avatar
 
Join Date: Mar 2005
Location: A life on the ocean waves when I'm not at home in N. Wales (but I'm not Welsh so no sheep jokes!)
If it does exist, does it matter ?

Can we hear it ?

.
__________________
If it ain't broke, break it !! Then fix it again. It's called DIY !
  Reply With Quote
Old 15th August 2011, 03:41 PM   #3
diyAudio Member
 
abraxalito's Avatar
 
Join Date: Sep 2007
Location: Hangzhou - Marco Polo's 'most beautiful city'. 700yrs is a long time though...
Blog Entries: 98
Send a message via MSN to abraxalito Send a message via Yahoo to abraxalito Send a message via Skype™ to abraxalito
Using an inverter gives the 1's complement. Audio data is in 2's complement. The difference between the two is 1LSB. I myself don't consider such a small difference a problem, but its a real difference, not an imagined one. If you want the signal perfectly inverted you'll need to add 1LSB to the 1's complement.
__________________
It doesn't have to take the form of a conspiracy, rather a consensus... James H Kunstler
  Reply With Quote
Old 15th August 2011, 04:26 PM   #4
diyAudio Member
 
Join Date: Jun 2007
Quote:
Originally Posted by abraxalito View Post
Using an inverter gives the 1's complement. Audio data is in 2's complement. The difference between the two is 1LSB. I myself don't consider such a small difference a problem, but its a real difference, not an imagined one. If you want the signal perfectly inverted you'll need to add 1LSB to the 1's complement.
You also need to look for overflow if you try to invert fullscale negative.
  Reply With Quote
Old 15th August 2011, 07:19 PM   #5
diyAudio Member
 
Join Date: Jun 2011
Location: SCOTLAND
Quote:
Originally Posted by oshifis View Post
Thinking about inverting the I2S signal and producing L+/L- and R+/R- for balanced DAC operation.

I am trying to understand where the alleged 1-bit shift is coming when a simple inverter is used, instead of the more difficult 32-bit shift register solution described elsewhere. Obviously the L+ and L- can not be handled by the same chip with the simple inverter.

The issue is I don't see any 1-bit shift with the simple inverter, others are referring to. Let's take the offset binary range 0000 to FFFF. The 2s complement will be 8000 to 7FFF, the zero is 0000, -1 is represented by FFFF, +1 is represented by 0001. Now, inverting the binary signal and adding it to the original results 0000 (overflow truncated). I don't see any 1-bit shift.

Here is another thing that confuses me: let's take the analog signal. Any positive value between 0 and +LSB converts to 0000. Any negative value between 0 and -LSB converts to -1 (FFFF in 2s complement representation). So a small noise superposed on zero will cause alternating between 0000 and FFFF. This is because there is no round-up, just truncation. Does it mean the "real" analog zero is at -1/2, i.e. halfway between 0 and -1?

Should we worry about this at all, or is it just pure perfectionism?

I have been listening to my dual 1541a dac with one dac receiving inverted data for 2 weeks and cannot hear anything unwanted. Its only the lsb that is in error - my argument for ignoring this is: -

When playing a track, there is always some background noise present from the recording environment (no recordings are done in anechoic chambers) and the chain from mic, ADCs, mixing desk, to recorder and this noise will mask (dither?) any lsb errors.
So in theory you may be able to detect it or even measure it with state of the art equipment, in the real world - actually listening to music, you won't.
  Reply With Quote
Old 15th August 2011, 09:33 PM   #6
diyAudio Member
 
Join Date: Oct 2001
Location: .
|If you can't hear a -96db tone, assuming 16bit data, don't worry about it. One is much better served chasing sub picosecond levels of jitter.
  Reply With Quote
Old 16th August 2011, 12:20 AM   #7
diyAudio Member
 
abraxalito's Avatar
 
Join Date: Sep 2007
Location: Hangzhou - Marco Polo's 'most beautiful city'. 700yrs is a long time though...
Blog Entries: 98
Send a message via MSN to abraxalito Send a message via Yahoo to abraxalito Send a message via Skype™ to abraxalito
Quote:
Originally Posted by Tazzz View Post
You also need to look for overflow if you try to invert fullscale negative.
Yes. In my way of thinking 0x8001 is full-scale negative, 0x8000 I consider to be NaN (not a number) because it has no inverse (negative) within the 16bit number system. If its counted as valid then the space available for representing signals is asymmetric.
__________________
It doesn't have to take the form of a conspiracy, rather a consensus... James H Kunstler
  Reply With Quote
Old 16th August 2011, 12:40 AM   #8
diyAudio Member
 
Join Date: Jan 2008
Location: Virginia
Sure, if 15 bit from 16 original are enough... why not? Why even bother with differential out if the LSB is not important?
After all there is a whole generation that listens only to lossy compressed "music" (maybe 10-12 bit resolution) and they don't complain. Or know any better.
  Reply With Quote
Old 16th August 2011, 10:16 AM   #9
oshifis is offline oshifis  Hungary
diyAudio Member
 
Join Date: Mar 2004
Location: Budapest, Hungary
Quote:
Originally Posted by abraxalito View Post
Yes. In my way of thinking 0x8001 is full-scale negative, 0x8000 I consider to be NaN (not a number) because it has no inverse (negative) within the 16bit number system. If its counted as valid then the space available for representing signals is asymmetric.
Don't forget that 2s complement is just the I2S signal format entering the DAC. It will be converted back to the natural OB (offset binary) format internally. It is 1-to-1 conversion, 2C 8000 (-32768 decimal) will convert to OB 0000. So 8000 is an existing value, this is the lowest number. Its inverse is 7FFF (+32767 decimal) is the highest number.
There are 32768 steps in the positive domain (0000 to 7FFF, 0 to 32767) and 32768 steps in the negative domain (FFFF to 8000, -1 to -32768). The range is symmetrical, because as I concluded above, the analog zero plus some noise converts to alternating 0 and -1 with 50%-50% probability.
  Reply With Quote
Old 16th August 2011, 10:40 AM   #10
diyAudio Member
 
abraxalito's Avatar
 
Join Date: Sep 2007
Location: Hangzhou - Marco Polo's 'most beautiful city'. 700yrs is a long time though...
Blog Entries: 98
Send a message via MSN to abraxalito Send a message via Yahoo to abraxalito Send a message via Skype™ to abraxalito
I didn't see a conclusion above, rather I saw a claim. You claimed 'there's no round up, just truncation'. What did you base that claim on? You then continued as if you weren't quite sure of your claim. As far as I'm aware, digital silence is not at -0.5LSB, rather its at zero. If there's dither employed, why would it be biassed in the negative direction?

What you said about DACs may or may not be true, depending on their internal architecture. I doubt very much that those where there's a claim of 'no glitch around zero' use offset binary internally. Perhaps you'd get some ideas from reading the datasheet of Ti/BB PCM63.
__________________
It doesn't have to take the form of a conspiracy, rather a consensus... James H Kunstler
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
24 bit ADC interfacing with ARM using I2S sukhdeep Digital Line Level 2 20th June 2009 03:37 PM
24 bit I2S with only 32x f_s SCLK? capslock Digital Source 1 27th October 2007 10:19 PM
24 bit I2S source to 16 bit DAC? chris719 Digital Source 5 18th June 2005 05:24 PM
I2S 16 vs. 24 bit as in PCM 1792 data sheet? capslock Digital Source 4 23rd September 2003 10:02 AM


New To Site? Need Help?

All times are GMT. The time now is 01:28 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2