SLAU846A June 2023 – October 2023 MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G3105 , MSPM0G3105-Q1 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3505 , MSPM0G3505-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1
A signed 32-bit integer is a 32-bit positive or negative number ranging from -231 to 231 – 1, and it is expressed as type int32_t. To convert a signed 32-bit integer from decimal:
Convert the integer to an unsigned 32-bit integer
Invert the number
Add 1 to the least significant bit (LSB)
For instance, the number -123456 is equal to 0b 11111111 11111110 00011101 11000000, or 0xFFFE1DC0.