- Home
- Source & Line
- Digital Source
- Theory: what happens around zero level?

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter lcsaszar
- Start date

- Status
- This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.

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.

Regards Karl

Digital Domain - Dither

I found Bob Katz's book 'Mastering Audio' to be most informative, definitely recommended.

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.

- Status
- This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.

- Home
- Source & Line
- Digital Source
- Theory: what happens around zero level?