Other Parts Discussed in Thread: MSP430F2618
Hi
I am using MSP430f2618 and IAR compiler.
I would like to implement the follwing multiplication in software rather than using the hardware mulitiplier.
I am trying to multiply a 16 bit number with an 8 bit number and the result is going to be more than 16 bits. If i directly multiply them then my Most significant bits are chopped off and the least significant 16 are available. can I know How I can get the 16 bit results where I can retrive the most significant 16 bits. see the following example
typedef unsigned short WORD;
typedef unsigned char BYTE;
WORD i, result;
BYTE j;
void main( )
{
i = FECA; // 16 bit number
J = FF; // 8 bit number
result = I*J; // my result = CB36 (16 bits with most significant bits chopped off)
// the Ideal result should be FDCB36 and my desired result is FDCB (16 most significant bits)
}
Thank you;
}