Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #30242

Re: Fixed Point Calculations

From Tauno Voipio <tauno.voipio@notused.fi.invalid>
Newsgroups comp.arch.embedded
Subject Re: Fixed Point Calculations
Date 2021-01-03 12:18 +0200
Organization A noiseless patient Spider
Message-ID <rss5l6$t3t$1@dont-email.me> (permalink)
References <671ff803-ba6f-40df-8c65-57ddf689473cn@googlegroups.com> <071uuf1cjq04rqvog7tmhn0c12aflmdget@4ax.com> <8441a69e-f16d-4ff7-8e62-12c75a253f69n@googlegroups.com>

Show all headers | View raw


On 3.1.21 11.45, Rick C wrote:

> I remember coding a shift and add multiplier once and that had issues with a signed multiplier.  So for negative multipliers I just complemented the multiplier to be a positive number and subtracted all the partial products or complemented the result or something similar.  I dug into the code for simulating the DSP units and it appears they provide controls to indicate if each input is signed or unsigned.  In the simulation they double with word width going into the multiplier, sign extending if signed, then pick the 36 lsbs for the result.  This seems to work for signed values using the same hardware as for unsigned.
> 

The classical solution to signed multiply in 2's complement arithmetic
is Booth's algorithm (Google for it).

-- 

-TV

Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Fixed Point Calculations Rick C <gnuarm.deletethisbit@gmail.com> - 2021-01-01 02:18 -0800
  Re: Fixed Point Calculations upsidedown@downunder.com - 2021-01-01 13:33 +0200
    Re: Fixed Point Calculations Rick C <gnuarm.deletethisbit@gmail.com> - 2021-01-03 01:45 -0800
      Re: Fixed Point Calculations Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2021-01-03 12:18 +0200
        Re: Fixed Point Calculations Rick C <gnuarm.deletethisbit@gmail.com> - 2021-01-03 05:33 -0800
      Re: Fixed Point Calculations upsidedown@downunder.com - 2021-01-03 14:48 +0200
      Re: Fixed Point Calculations David Brown <david.brown@hesbynett.no> - 2021-01-03 15:38 +0100
        Re: Fixed Point Calculations Rick C <gnuarm.deletethisbit@gmail.com> - 2021-01-03 18:55 -0800
          Re: Fixed Point Calculations David Brown <david.brown@hesbynett.no> - 2021-01-04 09:26 +0100
            Re: Fixed Point Calculations Rick C <gnuarm.deletethisbit@gmail.com> - 2021-01-17 22:11 -0800
              Re: Fixed Point Calculations David Brown <david.brown@hesbynett.no> - 2021-01-18 08:53 +0100
                Re: Fixed Point Calculations Rick C <gnuarm.deletethisbit@gmail.com> - 2021-01-18 00:42 -0800
                Re: Fixed Point Calculations Anssi Saari <as@sci.fi> - 2021-01-18 22:00 +0200
                Re: Fixed Point Calculations Rick C <gnuarm.deletethisbit@gmail.com> - 2021-01-18 13:46 -0800
                Re: Fixed Point Calculations upsidedown@downunder.com - 2021-01-19 10:44 +0200
                Re: Fixed Point Calculations Rick C <gnuarm.deletethisbit@gmail.com> - 2021-01-19 01:14 -0800
                Re: Fixed Point Calculations Anssi Saari <as@sci.fi> - 2021-01-20 09:50 +0200

csiph-web