Re: fixed point representation and signed numbers

Discussion in 'VHDL' started by KJ, Sep 5, 2008.

  1. KJ

    KJ Guest

    On Sep 5, 10:50 am, blackpadme <> wrote:
    > Hi, i'm working with fixed point numbers which have two bits for no-
    > fractional part (in two complement) and eight bits for fractional
    > (i.e. pi/2 =  0.5703 => 00.10010010). But, what happen if i need
    > signed representation for the fractional part ? 11.10010010 = -1.5703.
    > What can i do if a need to represent -pi/2 and i need to work across
    > division, add, multiplicacion etc. ?
    >


    Google for "Fixed_pkg_c.vhdl" (I think it's at vhdl.org somewhere).
    This relatively new package nicely handles all the bit fiddlings
    required to work with fixed point numbers...saves you the trouble of
    re-inventing the wheel.

    KJ
    KJ, Sep 5, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Motaz Saad
    Replies:
    7
    Views:
    6,483
  2. Replies:
    10
    Views:
    2,828
    Torsten Bronger
    Dec 15, 2005
  3. blackpadme
    Replies:
    4
    Views:
    1,267
    rickman
    Sep 7, 2008
  4. blackpadme
    Replies:
    0
    Views:
    509
    blackpadme
    Sep 5, 2008
  5. Saraswati lakki
    Replies:
    0
    Views:
    1,321
    Saraswati lakki
    Jan 6, 2012
Loading...

Share This Page