numeri formats : decimal > 1.23 format
 User Name Stay logged in? Password
 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
 27th January 2004, 03:53 PM #1 diyAudio Member   Join Date: Nov 2003 Location: France / Besançon numeri formats : decimal > 1.23 format how to convert decimal values (ex: 6.5) in digital (format 1.23) ?
 27th January 2004, 04:27 PM #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 ?
 5th May 2004, 11:28 AM #3 diyAudio Member   Join Date: Nov 2003 Location: France / Besançon No idea ?
 5th May 2004, 12:22 PM #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])
 6th May 2004, 06:05 AM #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
 10th May 2004, 11:19 AM #6 diyAudio Member   Join Date: Dec 2003 Location: Iasi I can't help you but you might find someone who knows better at http://www.hydrogenaudio.org .

 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 OffTrackbacks are Off Pingbacks are Off Refbacks are Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Zoran Digital Source 43 14th May 2010 09:55 AM rick57 Digital Source 2 14th February 2007 12:55 AM chuckg Digital Source 1 20th August 2005 01:09 AM haldor Digital Source 2 28th January 2003 04:01 AM

 New To Site? Need Help?

All times are GMT. The time now is 02:10 PM.