Fixed point Multiplication:
For fixed point multiplication, two operands need not be in same Q-format.
QIResult = QIA + QIB.
QFResult = QFA + QFB.
For example if two operands are in same format (QI) the resultant value after multiplication will be 2 X QI (twice of QI).
Consider two fixed point values which are in Q2.6 and Q1.7 format. The integer part of the product will be sum of integer bits taken by each operand, fractional part will be sum of fractional bits of each operand.
Therefore => Q2.6 X Q1.7
WL required to store the product will be the sum of the WL’s of each operand. In the above example WL of each operand taken as 8-bit so the resultant will be twice the WL of any of the operands WL i.e. WLR = 16-bit
If two operands are of B-bits the resultant product will be of (2 x B) bits. If you want to store (2 x B) bits in X bits data type, you need to saturate the result and then store it in the given data type.
Examples to come