© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
S. SmithRP2040 Assembly Language Programminghttps://doi.org/10.1007/978-1-4842-7753-9_12

12. Multiplication, Division, and Floating Point

Stephen Smith1  
(1)
Gibsons, BC, Canada
 

In this chapter, we return to using mathematics. We’ve already covered addition, subtraction, and a collection of bit operations on our 32-bit registers. Now we learn how to perform multiplication, division, interpolation, and floating point, starting with multiplication.

Multiplication

Integer 32-bit multiplication is built into the ARM Cortex-M0+, and the instruction set includes the MUL instruction :
MUL Rd, Rn

This instruction calculates Rd = Rd * Rn and executes in one clock cycle. ...

Get RP2040 Assembly Language Programming: ARM Cortex-M0+ on the Raspberry Pi Pico now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.