Continue to Site

Welcome to

Welcome to our site! 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.

Can anybody tell me about 2's complement multipliers ?

Not open for further replies.


Newbie level 5
Nov 29, 2005
Reaction score
Trophy points
Activity points

I want to implement 8 bit 2's complement multipliers ( for fractional number multiplication ) in VHDL. Can anybody suggest me some algorithms or send me the VHDL/verilog code ?

Thanks in Advance,
Narasimha Naik

I would do this in Verilog. Verilog doesn't have any fractional data types, so I would simply remember where I put the decimal point.

module top (a, b, y);
  input signed  [7:0] a, b;
  output signed [7:0] y;

  assign y = a * b;

Go here and look for Universal Multiplier.

**broken link removed**
its better to use booths algorithm for signed multiplication.
Hello Anjali,

Actually I want to implement fractional value (in 2's complement) multipliers in represeneting fractional value in binary and multiplying. Does Booths algorithms support this fractional value multiplication ? If not, Can you suggest any algorithms for this ? I really need some help.

Best Regards,
Narasimha Naik

I'm not sure I understand your question. Multiplication of fractions is exactly the same as integer multiplication, except for the position of the decimal point.

For example, let's assume you already have hardware that multiplies two 8-bit integers to get a 16-bit product:
aaaaaaaa * bbbbbbbb = yyyyyyyyyyyyyyyy

You can use the same hardware to multiply two 8-bit fraction values:
aaa.aaaaa * = yyyyyyyyy.yyyyyyy

However, if you don't yet have an integer multiplier, and for some reason your don't want to use the HDL * operator, than that's a different problem.

Hello echo47,

you have written that same hardware can be used for integer and fractional multiplication. ie

aaaaaaaa * bbbbbbbb = yyyyyyyyyyyyyyyy

aaa.aaaaa * = yyyyyyyyy.yyyyyyy

I think we can not use the same hardware for integer and fractional multiplication.

See for example
0.5 * 0.5 = 0.25

0.5 = 01 in binary;

Then, 01 * 01 =0001 = 1 in decimal and 0001 is not equal to 0.25 in binary.

But, 0.25 = 0100

So I think we cannot use same hardware for integer and fractional value multiplication. Isn't it ?

Write to me further.

Narasimha Naik

according your example
0.5 = 01 in binary;
Then, 01 * 01 =0001
0001 is not 1
you should notify the position of the decimal point.
as for algorithm
there are a lot of algorithms for multiplier implemention
you can seach them in google,
it is easy to find a lot of useful links
as anjali said, booth encode is a good method for area and speed, especially 4-based booth encode.
Or you can use my 8-bit example:

aaa.aaaaa * = yyyyyyyyy.yyyyyyy
0.5 = aaa.aaaaa = 000.10000
0.5 = = 000000.10
000.10000 * 000000.10 = 000000000.0100000 = 0.25

To determine the location of the output decimal point, you add the number of input fraction bits. Five fraction bits times two fraction bits gives you seven fraction bits.
Not open for further replies.

Part and Inventory Search

Welcome to