Although we are used to the base 10 decimal system for everyday counting, computers operate using a different system that uses only two digits, 1 and 0, to represent numbers. Counting in Binary, however, is quite unnatural for humans to use because even small numbers become long quickly. Using binary to represent numbers can be sometimes confusing but we will be using binary and hexadecimal values and operations extensively when programming the MSP430, so it’s critical to understand how they operate.
A CPU, and by extension a microcontroller, is a number cruncher. The first thing we must understand is how to represent numbers in a manner that the compiler, and therefore the CPU, can understand.