Digital Arithmetic and Conversions
E.1 Microcontroller Arithmetic
Microcontrollers are not designed for intensive numeric processing; therefore, they are not equipped with many arithmetic operators usually found in microprocessors. A typical mid-range microcontroller has instructions to add and subtract integers and perhaps to increment and decrement. Hardware multiplication is rarely available and even more rare is division. Likewise, there is usually no hardware support for decimal and floating-point arithmetic. For this reason the microcontroller programmer is often challenged to provide most arithmetic and data processing operations in software.
In this discussion we assume a mid-range microcontroller, such as the PIC 16f8x. These ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access