numeri formats : decimal > 1.23 format - diyAudio
Go Back   Home > Forums > Source & Line > Digital Source
Home Forums Rules Articles diyAudio Store Gallery Wiki Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

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
Old 27th January 2004, 03:53 PM   #1
diyAudio Member
Join Date: Nov 2003
Location: France / Besançon
Question numeri formats : decimal > 1.23 format

how to convert decimal values (ex: 6.5) in digital (format 1.23) ?
  Reply With Quote
Old 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 ?
  Reply With Quote
Old 5th May 2004, 11:28 AM   #3
diyAudio Member
Join Date: Nov 2003
Location: France / Besançon
No idea ?
  Reply With Quote
Old 5th May 2004, 12:22 PM   #4
diyAudio Member
bigparsnip's Avatar
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])
  Reply With Quote
Old 6th May 2004, 06:05 AM   #5
hjelm is offline hjelm  Sweden
diyAudio Member
hjelm's Avatar
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)
  Reply With Quote
Old 10th May 2004, 11:19 AM   #6
lucpes is offline lucpes  Romania
diyAudio Member
Join Date: Dec 2003
Location: Romania, EU
Send a message via Yahoo to lucpes
I can't help you but you might find someone who knows better at .
  Reply With Quote


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
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?

All times are GMT. The time now is 05:23 AM.

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

Content Relevant URLs by vBSEO 3.3.2