Search the Q&A Archives

# How can negative numbers can be represented in fixed point...

<< Back to: comp.dsp FAQ [1 of 4]

 Question by Deepaa Submitted on 4/2/2004 Related FAQ: comp.dsp FAQ [1 of 4] Rating: Rate this question: N/A Worst Weak OK Good Great How can negative numbers can be represented in fixed point 24-bit DSP processors. If answer is for Motorola DSP 56k processor I will be more helpful

 Answer by bülent Submitted on 12/7/2004 Rating: Not yet rated Rate this answer: N/A Worst Weak OK Good Great if you are going to use such a chip, then clearly the technical reference of the chip would indicate the native data formats it. Now if it does support negatives by hardware you are OK , just use it ( it does not matter fix point or not) but if chip does not support it, you should by software define a sign indicator. The simplest is to assign one bit of each number for sign. This will however decrease the range of numbers by 2.

 Answer by David Cary Submitted on 3/15/2005 Rating: Not yet rated Rate this answer: N/A Worst Weak OK Good Great Practically all computers represent negative numbers using two's complement. The Motorola DSP56K is no different. For example: 7FFFFF = 1 - 2^-23 7FFFFE = 1 - 2^-22 ... 400000 = 2^(-1) = +1/2 ... 000003 = 3*2^-23 000002 = 2^-22 000001 = 2^-23 000000 = 0 FFFFFF = -2^-23 FFFFFE = -2^-22 FFFFFD = -3*2^-23 ... C00000 = -2^(-1) = -1/2 .... 800001 = -1 + 2^-23 800000 = -1 See the the DSP 56K reference manual http://www.freescale.com/files/dsp/doc/ref_manual/DSP56300FM.pdf for more details. In particular, chapter 3.2.1 "Data Representation". http://en.wikipedia.org/wiki/Signed_number_representations .

 Answer by mouse Submitted on 5/19/2007 Rating: Not yet rated Rate this answer: N/A Worst Weak OK Good Great want to access

Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

<< Back to: comp.dsp FAQ [1 of 4]