Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to multiply 2 signed Fixed-Point numbers ?

Status
Not open for further replies.

omara007

Advanced Member level 4
Joined
Jan 6, 2003
Messages
1,237
Helped
50
Reputation
102
Reaction score
16
Trophy points
1,318
Location
Cairo/Egypt
Activity points
9,716
Hi guys

I have two 16-bit bit vectors .. each one represents a signed binary number. The format of each vector is as follows:

XXXX . XXXXXXXXXXXX

Where the (dot) represents the binary point that separates the integer part from the fraction part.

The Most Significant Bit order is (15), while the Least Significant Bit order is (0).

As the vector is signed, bits (12, 13, 14) represent the integer value while bit (15) is the sign bit. The numbers are represented in 2's complement format.

Now, I want to multiply these 2 vectors. I know that the result will be placed in a 32-bit vector. Yet, where will be the position of the binary point ? .. Please notice that it's a signed multiplication process.
 

The fraction part is 12+12=24 bit long. Doesn't matter either it signed or not.
 

Yes, so you have to drop 12 fractional bits and use saturation logic for the integer part.
 

FvM said:
Yes, so you have to drop 12 fractional bits and use saturation logic for the integer part.

Didn't understand what you said exactly .. please elaborate more ..
 

You were told in plain english: the product fraction size will be 24 bit. That is (4.12) x (4.12) = (8.24).
 

Drop (or cut) 12 fractional bits is self-explanatory, I think. If you have doubts about needing saturation logic, you may want
to play around with numeric examples and consider, how you intend to handle a numeric overflow.
 

GeorgeM said:
You were told in plain english: the product fraction size will be 24 bit. That is (4.12) x (4.12) = (8.24).

Thanks GeorgeM .. Yet, I don't think my last comment was intended for you .. did you notice that I quoted FvM ?

FvM said:
Drop (or cut) 12 fractional bits is self-explanatory, I think. If you have doubts about needing saturation logic, you may want
to play around with numeric examples and consider, how you intend to handle a numeric overflow.

Yes FvM .. it's about Saturation Logic .. did you assume I won't use a 32bit register for the output ?
 

Hi,,

you can use
"a 2's complement parallel array multiplier by bough & wooley"

paper..

regards

Chin
 

chin said:
Hi,,

you can use
"a 2's complement parallel array multiplier by bough & wooley"

paper..

regards

Chin

Would you please send a link to the paper ?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top