Hello,
A's format is 9bits signed 2's complementary code.
B is a binary sequence consisting of only 1 and -1 except 0 and its format is 2bits signed 2's complementary code.
How to simplify the multiplication: A*B? any specific algorithm?
For both signed number Multiplication ,You need to consider few things
1-Sign extend results of partial products
2-For sign bit multiplication (if its 1 ) take 2's complement of multiplicand.
3-Ignore the carry out from MSB to get the accurate result...
10 (-2)
x 10 (-2)
---------- 0000
010x Take 2's complement of multiplicand (110 = 001+1 = 010) and append
----------- 0100 ignore the MSB to get correct answer i.e 4 = 100
Fine .....you can extend the concept .......for multiplicand 1 and -1 only ....Detect from input streamif its 1 copy the multiplicand as it is....If its -1 take 2's complement of multiplicand ,Shift the partial product.....sign extend and Add partial product ....Try it for small numbers and check the result....