Fast Multiply Using Shifts/Adds

Hard Assembly Math
Solve this problem

Implement a fast integer multiply routine in ARM assembly using only shifts and adds (no MUL). Support signed 32-bit multiplicands.

Constraints

  • r0=a, r1=b.
  • Use Booth's algorithm or shift-add.
  • Return 32-bit result in r0.
  • Support negative values.
Starter codeAssembly
1.global mul_fast2mul_fast:3    ; TODO