This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS中F28335的乘法问题



定义了:

int a =-1000;

unsigned int b=555;

INT32 c;

c = a*b;

为什么得到c的结果不是-555000呢?

只有写成:c=(INT32)a*b;      才能得到正确的结果。

我想请问:在DSP中变量的运算并赋值都可能出现溢出的情况,在DSP中具体硬件是怎么执行运算指令的呢?c = a*b;语句是先赋值给16位数相乘,得到16位数的结果,然后在赋值给32位数的变量?