|
|||||||
| Home | Forums | Rules | Articles | Store | Gallery | Blogs | Register | Donations | FAQ | Calendar | Search | Today's Posts | Mark Forums Read | Search |
| 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 |
|
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
diyAudio Member
Join Date: Nov 2003
Location: France / Besançon
|
how to convert decimal values (ex: 6.5) in digital (format 1.23) ?
|
|
|
|
#2 |
|
diyAudio Member
Join Date: Nov 2003
Location: France / Besançon
|
...I had to convert values for an EQ coefficient for Analog Devices AD1954 (or AD1953), SigmaDSP.
i have example: ex: 2.20 format 100000000000000000000 = -2.0 110000000000000000000 = -1.0 010000000000000000000 = 1.0 but for othe decimal values ? |
|
|
|
#3 |
|
diyAudio Member
Join Date: Nov 2003
Location: France / Besançon
|
No idea ?
|
|
|
|
#4 |
|
diyAudio Member
Join Date: Apr 2003
Location: Cambridge
|
you have to think of things below the decimal point as still being in powers multiples of 2 to the power of whatever.
i.e. the first binary digit after your zero digit will be 1/2, then 1/4 etc. So, if you wanted to store 1.25 in your 1,23 scheem 10100000... (with the fist one bing equal to 2^0, then the second one in the sequence being 2^[-2]) If you think about it, it is just the same as in a decimal system, but with base two rather than ten (0.1 =10^[-1], and 0.5 = 2^[-1]) |
|
|
|
#5 |
|
diyAudio Member
Join Date: Nov 2003
Location: Västerås
|
It is not such an easy question if you plan to do signal processing with it.
The things to consider is the tradeoff between resolution and risc of saturation/wraparound. If you want to do it properly then you need to design for the worst case, i.e. all coefficients and the input to the filter adds up and this will decide the decimal point. If you want to make it simpler as a rule of thumb you could use the maximum gain of the filter as a way to decide where to put the decimal point and shift it one more step to the right to have headroom for internal nodes in the filter. Decide where you want to place the decimal point and then the actual conversion sould be straight forward. The thing to remember is that you might not be able to represent the decimal values exactly wherever you place the decimal point. (0.1 is an example)
__________________
Hjelm |
|
|
|
#6 |
|
diyAudio Member
|
I can't help you but you might find someone who knows better at http://www.hydrogenaudio.org .
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| TDA_1541A input formats | Zoran | Digital Source | 43 | 14th May 2010 09:55 AM |
| Best CD formats for standard CD players | rick57 | Digital Source | 2 | 14th February 2007 12:55 AM |
| consumer / pro digital formats | chuckg | Digital Source | 1 | 20th August 2005 01:09 AM |
| Digital Audio Formats | haldor | Digital Source | 2 | 28th January 2003 04:01 AM |
| New To Site? | Need Help? |