Method and system for realizing multiplication operation on MCU (Microprogrammed Control Unit), storage medium and electronic equipment
The invention discloses a method and a system for realizing multiplication operation on an MCU, a storage medium and electronic equipment, a multiplicand and a multiplier are integers, binary multiplication operation needs to be carried out, the method comprises the following steps: identifying each...
Gespeichert in:
Hauptverfasser: | , , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention discloses a method and a system for realizing multiplication operation on an MCU, a storage medium and electronic equipment, a multiplicand and a multiplier are integers, binary multiplication operation needs to be carried out, the method comprises the following steps: identifying each digit in the multiplier, shifting the multiplicand left by a corresponding digit according to the identified digit to obtain a shift value of the multiplicand, and calculating the shift value of the multiplicand according to the shift value of the multiplicand; and adding the shift values of all multiplicands to obtain a product. According to the method, multiplication is realized on the MCU with limited resources through addition and shift operation, so that the problem that multiplication operation cannot be directly used due to the fact that a floating point arithmetic unit is not arranged in the low-cost MCU or a compiler cannot well support multiplication and the like can be solved, the device cost is saved, |
---|