Theory: what happens around zero level? - 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 10th April 2008, 03:33 PM   #1
oshifis is offline oshifis  Hungary
diyAudio Member
 
Join Date: Mar 2004
Location: Budapest, Hungary
Default Theory: what happens around zero level?

I have been thinking about this: in the 16-bit representation of the analog audio signal there are 65536 discrete levels, from 0 to 65535. Now, if the digital word that belongs to zero analog level (no signal) is shifted to the middle, that could be either at 32767 (7FFF hex) or at 32768 (8000 hex). But in either case, the span to the negative peak (0) and to the positive peak (65535, FFFF hex) is not symmetrical. There are either 32767 discrete levels in one direction and 32768 levels in the other direction (excluding the "zero" level), or vice versa. Or is the zero level set between 32767 and 32768, and does the inherent analog noise make it fluctuating between the two? I have no access to the Red Book, perhaps the binary word belonging to zero analog level is defined in it. Anybody has this information?
  Reply With Quote
Old 10th April 2008, 04:12 PM   #2
diyAudio Member
 
Bernhard's Avatar
 
Join Date: Apr 2002
Location: Munich
Zero is zero. 0111111...
  Reply With Quote
Old 10th April 2008, 05:53 PM   #3
diyAudio Member
 
Join Date: Mar 2007
Zero is...zero. 0x0000. Signed integers are represented using two's complement, they aren't just centred on the halfway point. You're right though, since the number of available values is (by definition) even you can't have zero without having an imbalance on either side.

Consider:

0 - 0x0000
32767 - 0x7fff
-32768 - 0x8000
1 - 0x0001
-1 - 0xffff

To perform the conversion to or from a negative value, invert all bits and then add one. For example, 3 is 0x0003. Inverted it becomes 0xfffc. Add one and you get 0xfffd, the binary representation of -3.

The reason for this is that it makes signed arithmetic identical to unsigned arithmetic. It also makes the MSB a sign bit - if that bit is set, the number is negative.
__________________
http://audio.gotroot.ca/
  Reply With Quote
Old 11th April 2008, 06:59 AM   #4
Mooly is online now Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
I think I understand what oshifis is trying to say, we have 16bits, which equates to 65536 discrete voltage levels. If we define the max output voltage required say 2v (without going into rms and pk/pk values here) in the case of a typical CD player we get 2 divided by 65536 or steps of 0.00003051 volts. If we superimpose a 2 volt sine wave onto this scale where is the zero crossing point as a digital representation as in the analoge domain it is between samples. Where does dither come into this ? Isn't this introduced to help to linearize very small signals around "digital zero" where quantisation noise becomes significant.
Regards Karl
  Reply With Quote
Old 11th April 2008, 09:31 AM   #5
diyAudio Member
 
Join Date: May 2007
Information on dithering can be found here:

Digital Domain - Dither

I found Bob Katz's book 'Mastering Audio' to be most informative, definitely recommended.
  Reply With Quote
Old 11th April 2008, 10:26 AM   #6
Mooly is online now Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Great link, very informative. About 20 years ago I attended a Sony technical course on C.D. both theory and repair, and we covered in great detail the Red Book Standard. I wish I still had all the notes. I will see if our local library will obtain a copy
Regards Karl
  Reply With Quote
Old 11th April 2008, 12:20 PM   #7
oshifis is offline oshifis  Hungary
diyAudio Member
 
Join Date: Mar 2004
Location: Budapest, Hungary
I think zero is the smallest positive integer, so it should not have the sign bit set. Now I understand that analog zero should correspond to 0000 hex.

It may be of interest that MSB comes into the picture for the positive number region (or in 2s complement in the negative region). Let's imagine the internal binary weighted current sources (after the input digital signal is converted to true binary from 2s complement). Now the range is 0000 to 7FFFF for negative numbers, and 8000 to FFFF for positive numbers. The sign bit happens to be the MSB, so any polarity change around zero is influenced by the error of the MSB. Unfortunately MSB has the largest error.
  Reply With Quote
Old 11th April 2008, 11:39 PM   #8
Pulse-R is offline Pulse-R  Australia
diyAudio Member
 
Join Date: Mar 2005
Location: Melbourne
Since when is zero a number?

__________________
Digital is only on or off
  Reply With Quote
Old 12th April 2008, 12:17 AM   #9
SY is offline SY  United States
diyAudio Moderator
 
SY's Avatar
 
Join Date: Oct 2002
Location: Chicagoland
Blog Entries: 1
Since "In the beginning..."

("bereshith," for you Hebrew readers)
__________________
You might be screaming "No, no, no" and all they hear is "Who wants cake?" Let me tell you something: They all do. They all want cake.- Wilford Brimley
  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
Convert Line Level to Electric Guitar Level miallen Solid State 4 16th May 2010 01:22 PM
speaker level input vs line level question crippledchicken Subwoofers 4 17th July 2007 03:36 AM
lesser of two evils, high level -> line level, digital volume control mazurek Solid State 3 19th November 2006 12:25 AM
how to bring down line level signal to preamplifier level deji Solid State 15 15th April 2004 04:13 PM
Line Level, Balanced Voltage Level... dkemppai Solid State 3 10th December 2002 11:04 PM


New To Site? Need Help?

All times are GMT. The time now is 02:04 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