04-20-2018, 10:51 AM
Yeah, Multiplication is often either done by an external Math Processor (Somehow attach a Multiplier) or - much more fun - by writing a Multiplication Program, which you need a CPU for and thus branching. Its quite fun to write, actually not that long. However, instead of adding number A B times to a value C to computate the Result it would be much faster using bit shifting. In that case you actually only have to loop as often as you have bits. For example, to Multiply a 4 Bit with a 4 Bit number to get an 8 Bit result (8 Bit CPU recommended here to avoid major pain in the ass) it would only have to loop 4 times. I wrote such a program for my CPU on build and crammed multiplication into 13 instructions. Ifyou wanna look at it its in the back of my CPU on build. I can definitely show you when im online, which [might?] be in about 7 hours from me posting this.
Hope this helps!
Hope this helps!