Exploring data types and memory
Programs perform a sequence of operations on data to create some result. Everything ultimately becomes binary on the computer. However, we typically think in decimal. In C, we must tell the program how to encode the data when we declare a variable. This will determine the binary pattern used to represent the data in memory. This will also change how operations are performed on the data. Although it may not seem important on a high level, these issues can drastically change system performance. Moreover, carelessness with data types can cause unexpected bugs and issues. This is especially true when interfacing between multiple systems which is very common. Consider the Zynq chip by Xilinx. It features an ARM core along with custom programmable logic. This allows for attaching custom hardware to an ARM core for hardware acceleration of specialized functions. To properly do this, a solid understanding of data, types, and memory are mandatory.
ints
floats