Hi
This question is about signed variable bit shifting on the C2000 and the TMS 470 micro controllers . does the compiler maintain the sign when left or right shifting of negative variables .
Prem
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.
Hi
This question is about signed variable bit shifting on the C2000 and the TMS 470 micro controllers . does the compiler maintain the sign when left or right shifting of negative variables .
Prem
Hi Perm,
Yes, our compiler will maintain the sign when you taking the left or right shifting option with the negative variable. if you check the disassembly language for your code in our CCS, you'll find the right shifting for the negative variable is using the ASR and the left shifting is using LSL.