The Cortex®-M processors support a number of instructions for converting data between different data types.
6.4.1. Conversion of Data Size
On compilers for ARM® architecture, different data types have different sizes. A number of commonly used data types and its corresponding sizes on ARM compilers are shown in the following table (Table 6.7).
Size of commonly used data types in C language for ARM® architecture
C data type
Number of bits
“char”, “unsigned char”
8/16/32 (Smallest is chosen)
“short”, “unsigned short”
“int”, “unsigned int”
“long”, “unsigned long”
When converting a data value from one type to another type with a larger size, we need to sign extend or zero extend it. A number of instructions are ...
With Safari, you learn the way you learn best. Get unlimited access to videos, live online training,
learning paths, books, interactive tutorials, and more.